You should know about code tags by now.

Since the loop runs while count != 2, and count is incremented only inside an if statement, clearly that if statement condition isn't met twice.