Loop Count

There is all sorts of wrong in that code.

Where did you get it?