Variable not incrementing correctly

Danois90:
If the following code may be a problem because you are mixing && with || without grouping:

No problem there.

Logical-AND takes precedence over logical-OR.