Dynamic counter