checking how many objects with the same tag are on screen

I have found this answer b4 but lost it again.

how do i check for how many enemies with the same tag are currentlyin the game world

what i want to do is

var enemyClones = GameObject.FindGameObjectsWithTag ("enemy");

if (enemyClones.length<1){

print ("working"); }

You can put them in an array and count them with a loop.

var enemy_counter;

var enemies : GameObject[] = FindObjectsOfTag(Enemy) as GameObject[];
for (var enemy : GameObject in enemies) {
   enemy_counter++;
}
if(enemy_counter<1){
print("working");
}