A counter is just a binary value that increments up and is to be called locally.
Why is this useful? It saves more space than an integer and it's only purpose it to keep track of how many times something has happened, such as a recursion loop.
Is this acheivable already. Yes, literally just use an int instead. Does it save space and is it more optimised? In theory, yes, as it is binary and only ever increments up by one the program already knows how it will operate, it's deterministic in a way other variables are not.