counting the agents