Input: Sentence: 'Two men pose wearing ties and fedora hats'. Count the number of nouns in this sentence.
Output: 4