Right, and you had not defined the counter so there was no reason it'd print anything at all, the code which you had posted was gibberish, in a lot of languages the equivalent would just crash.
You could then note that - hey, in the real code, there's another line that DOES define the counter. That was missing in what you posted.
So the counter would then be defined, but not increasing. That'd be an entirely different situation.
You could then add prints before and after the line that you meant was supposed to increase that counter, and observe that it did not, and perhaps then explain what the line was supposed to do and ask what you were missing about that.
You were using postfix increment (VAR++) which adds 1 to the value and then returns the original value. prefix increment would increase the value and return the value that has been increased, that would have had the desired effect.