Approximate counting