implement support for counters