Outside of battle, you can use this script event command:
#_/ * get_battle_member_count(variable_id)
#_/ Stores the number of battle members the specified variable_id number.
#_/ This DOES NOT include standby members.
and use the variable for a conditional branch.
For in-battle, it would require some editing within the script to make that kind of check.
I no longer support Tankentai.