This should be moved to editing and scripting -- general. This board is for people to submit scripts for download at OFPEC.
Anyway, the way I would do this would be to place a trigger with conditions of "EAST--PRESENT" (assuming that east is the enemy, otherwise use west or resistance). The trigger radius must cover all possible enemy units. Give the trigger a name (like "alleast"). Now execute the following code to give you a hint about how many enemies are left:
hint format ["There are %1 enemies left",count (list alleast)]
Where
alleast is the name you gave to your trigger.
Look up the commands in the COMREF to see what they do.
Does it work for you?