Technically that wasn't a wish. He was just moping around saying he wanted to get out. The genie did that on his own. He still had 3 wishes after that: Become a prince, be saved from drowning, and free the genie.