Maybe the guy thought he wanted to understand women. He wanted to know how they think and what they think, everything about them. And when his wish was granted, he realized that he had changed his mind after all, and that, women are too complicated, etc. and will never be understood. So for his second wish he wanted to go back and forget all about the first wish, the women thing, in doing so he has now unknowingly used TWO wishes. So having had no idea of his first TWO wishes.... he decided to wish that he knew all about women, blah, blah,.... so the THIRD and final wish was granted. Doesn't that suck that the guy wasted THREE valuable wishes on understanding women, something he will never do nor does he want to. Does that make sense?
