Rate Limiting Algorithms and Distributed Counters