Input: Sentence: 'The man is wearing a mask while holding his phone'. Count the number of nouns in this sentence.
Output: 3