//contacts the population controller and returns the count of game objects with that tag. public int CountPop(GameObject controller, string tag) { PopulationController popController = controller.GetComponent(typeof(PopulationController)) as PopulationController; return(popController.GetPops()[tag]); }