Insane while loop behavior

Nope, and setting OVF_count to volatile works. Thanks for your help.