Door Password Puzzle

Puzzle of the Day 2062 :  Door Password Puzzle

Puzzle 2062 - Door Password Puzzle

A man comes from a long way to enter an exclusive club, but he did not know that he will require a password. So the Guard demands the password but he couldnt respond.

He observes that
Another man walks to the door and the doorman says 12, the man says 6, and is let in.
Another man walks up and the doorman says 6, the man says 3, and is let in.
Thinking he had heard enough, he walks up to the door and the doorman says 10, he says 5, and he isn’t let in.

What should he have said?