Check the number of alive enemy in battle

(I know this have been answered in RPG MV, but I am not skilled enough to implement it in ace)
I want to make a skill for an enemy that is only usable when there are at least 2 alive enemies.
The skill will "lock" the player so the other enemy can attack ignoring his defense and dodge. (this part I can handle it)
My would-be-implementation is to check at the end of each turn, whether there is at least 2 alive enemies, then open a switch
so that enemy can use that skill. Once it is no longer true, turn the switch off and change the "locked" state into something else.
(of course, I would also check if the player is already "locked" so in the rare occasion of multiple enemy using that skill, all later attempts fail or become something else)
For the event that runs each turn, first inflict an invisible "alive" State on all enemies. Then, check for each enemy if they're inflicted with "Alive" with a conditional branch, and if so, add +1 on a "Monster Count" Variable (also, reset this to 0 at the start of the event). If it counts 2 or higher, turn on the Switch that allow the enemy to use their special Skill. If it counts less than 2, turn off the Switch.

Original thread: https://forums.rpgmakerweb.com/threads/check-the-number-of-alive-enemy-in-battle.125137/