MV YEP State Categories Lunatic mode Help

So there's this function in YEP State Categories:
battler.getStateCategoryAffectedCount('text')

And since the function is to count how many states of said categories currently affecting target, i was going to make a state which increase ATK damage the more states in said categories the target has.
but i don't know how to utilize it to achieve the effect.

basically let's say the target has 5 "ailment" state category, then the attacker will gain 50% atk bonus to the target.
I assume the best way to achieve this is by using above function but i don't know how to utilize it on the lunatic. if anyone can help, i'd be grateful!

PS: Sorry for my broken english.

Original thread: https://forums.rpgmakerweb.com/threads/yep-state-categories-lunatic-mode-help.137021/