destroy all game objects that are touching the same collider?

Okay let me set this up for you guys. I have a bowl and I have tennis balls that slowly fall into the bowl.
I have scripts set up on the bowl and the balls so that it can count how many tennis balls have entered the bowl. I want to now create a script that every 30 seconds, the tennis balls get counted and if there are 8 or less balls in the bowl, destroy all balls (essentially empty the bowl) BUT if there are 9 or MORE balls in the bowl, it’s game over (bowl overflow)

here’s the scripts that I have attached to the Ball:

public int Balltocount;

void OnCollisionEnter(Collision other)
{
	if (other.gameObject.tag == "Bowl") 
	{
		other.gameObject.GetComponent<BallCounter>().CountBalls(Balltocount);
	
	}
}

}
And this is what I have on the BOWL:

public int Counter;

public void CountBalls(int howmany)
{
	Counter -= howmany;
}

}

this works fine and is able to count the balls colliding in the bowl, its just the next step that i mentioned above that i cant figure out. Thanks to anyone who takes a look at this.

This should work atleast the logic is correct.

public class ballcounter : MonoBehaviour {
    public int totalballs =0;
    private GameObject bola;
    private GameObject[] allballs;
    private int i = 0;
    public void CountBalls(GameObject bola)
    {
        totalballs++;
        allballs *= bola;*

i++;
}

private void Start()
{
allballs = new GameObject[100];
StartCoroutine(Destroy());
}

IEnumerator Destroy()
{

while (true)
{
yield return new WaitForSeconds(5f);
if (totalballs > 8)
{
//gameover
}
else if (totalballs <= 8 && totalballs > 0)
{
for(int j =0;j< allballs.Length; j++)
{
if(allballs[j] != null)
{
Destroy(allballs[j].gameObject);
}

}
i = 0;
totalballs = 0;
}
}

}
}
public class ball : MonoBehaviour {

void OnCollisionEnter(Collision other)
{
if (other.gameObject.tag == “Bowl”)
{
other.gameObject.GetComponent().CountBalls(this.gameObject);

Destroy(this.gameObject.GetComponent());
}
}
}