International audienceIn this paper, we study the fundamental problem of counting, which consists in computingthe size of a system. We consider the distributed communication model of population protocols of finitestate, anonymous and asynchronous mobile devices (agents) communicating in pairs (according to afairness condition). This work significantly improves the previous results known for counting in thismodel, in terms of (exact) space complexity. We present, prove correct and analyze the time complexitiesof the first space-optimal protocols solving the problem for two classical types of fairness, global andweak. Both protocols require no initialization of the counted agents.The protocol designed for global fairness, surprisingly, uses o...