[api] only accept ints as counter value