Counter API implementation