All tagged objects inactive help

Okay, so my idea is that when all the objects with the tag “Cubetarget” are inactive, it plays audio.

It is for target shooting so I can activate music when they are all inactive (Shot).

I have attached all the targets as a child to a gameobject i use as the manager. All the targets have the tag “Cubetarget”.

In simple terms, when you shoot a target it makes it inactive from the scene. When they are all inactive I want it to play the music from the manager.

I have tried different ways to make this work but I can’t get it to work.

If someone could guide me in the direction of doing this i would be very greatful. Thanks.

var GO ;

var GOCounter:int=2; // 2 targets for example.
 

function Start()
{
   GO = GameObject.FindGameObjectsWithTag ("Cubetarget");

}


function Update()
{

    if (SHOT)  // Whenever target is shot
    {
       GOCounter--;
       // some boolean to stop it after decrementing it by 1
    }

   // Decrement the GOCounter whenever the GameObjects are Destroyed.

     If ( GOCounter == 0)
   {
       // Play the Sound.
   }


}