find amount of objects with tag in unity 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 }