adding getCounter API