Hello Jozsef,
You're gonna have to provide more data in order for us to understand what you meant. At least I could not understand. How's this table defined? How's your counter defined ? And the 'simple calculation' you mentioned? Give us more details about the scenario and we may be able to help more.
BRs,
Lucas de Oliveira