Sort:  

Yup, I think you got it! Had he replied 'three' the guard would have let him in.

Yes, the number of letters is the key. 3 would have done it!