Updates total number of agents.