Input: Sentence: 'A man smiles with his food and glass of beer'. Count the number of nouns in this sentence.
Output: 4