whowas <nickname> [<count>] [<server>]
The number of entries returned by the server is controlled by the value of SET NUM_OF_WHOWAS. You can override this value by providing a second argument which shall be the number of entries you want returned.
You can query a remote server for a WHOWAS reply with /quote whowas <nick> <count> <server>
The exact determination of what is “recently” enough to be returned by WHOWAS is a server option and may be anywhere from several seconds to several weeks.
To show the last 5 users of the nickname JoeBob:
/whowas joebob 5