Optimal census by quorum sensing.