give each resistance unit a name, eg R1, R2, R3
In the init.sqs Create an array for that group, lets call it "resistance_array"
eg resistance_array = [R1, R2, R3, R4, R5]
making sure its a global variable (Eg transferrable from 1 script to another)
then create either a trigger or a looping script
have the array counted using ?alive count resistance_array (on the server machine)
eg
and then if count <20 or whatever number you want to impose
Have them do whatever co-op'y thing you want them to do
I aint into co-ops but this should give you a general idea
You could also create a new array using the ai that is alive and then have that array flee