getCounters function