The distributed estimation of the number of active sensors in a network can be important for estimation and organization purposes. We propose a design methodology based on the following paradigm: some locally randomly generated values are exchanged among the various sensors and thus modified by known consensus-based strategies. Statistical analysis of the a-consensus values allows estimation of the number of participant sensors. The main features of this approach are: algorithms are completely distributed, since they do not require leader election steps; sensors are not requested to transmit authenticative information (for example identificative numbers or similar data), and thus the strategy can be implemented whenever privacy problems arise. After a rigorous formulation of the paradigma we analyze some practical examples, fully characterize them from a statistical point of view, and finally we provide some general theoretical results and asymptotic analyses.