how to get the amount of objects with a certain tag code example
Example: how to find the number of objects with the same tag in unity
if(GameObject.FindGameObjectsWithTag("Enemy").Length > 20) { // Do something }
if(GameObject.FindGameObjectsWithTag("Enemy").Length > 20) { // Do something }