—The population protocol model provides theoretical foundations for analyzing the properties emerging from simple and pairwise interactions among a very large number n of anonymous agents. The problem tackled in this paper is the following one: is there an efficient population protocol that exactly counts the difference κ between the number of agents that initially and independently set their state to A and the one that initially set it to B, assuming that each agent only uses a finite set of states ? We propose a solution which guarantees with any high probability that after O(log n) interactions any agent outputs the exact value of κ. Simulation results illustrate our theoretical analysis. Keywords-Population protocol; Majority algorithm; Counting problem; Performance evaluation.