The population protocol model describes a network of n anonymous agents who cannot control with whom they interact. The agents collectively solve some computational problem through random pairwise interactions, each agent updating its own state in response to seeing the state of the other agent. They are equivalent to the model of chemical reaction networks, describing abstract chemical reactions such as A + B → C + D, when the latter is subject to the restriction that all reactions have two reactants and two products, and all rate constants are 1. The counting problem is that of designing a protocol so that n agents, all starting in the same state, eventually converge to states where each agent encodes in its state an exact or approximate description of population size n. In this survey paper, we describe recent algorithmic advances on the counting problem.