1. A method comprising: maintaining a plurality of logical counters in a memory that is used with an integrated circuit, the integrated circuit having a plurality of physical counters, wherein a number of physical counters is less than a number of logical counters; maintaining a physical counter mapping structure that associates each of the physical counters in the plurality of physical counters with a corresponding logical counter; receiving an indication to increment a first logical counter of the plurality of logical counters; identifying, using the physical counter mapping structure, one of the plurality of physical counters to associate with the first logical counter that is to be incremented; incrementing the identified physical counter; detecting when a second logical counter is to be associated with the identified physical counter; and then incrementing the first logical counter based on a count of the identified physical counter.