Input: Sentence: 'a man in a white shirt laying in bed'. Count the number of nouns in this sentence.
Output: 3