Input: Sentence: 'A man and a child laying down on a bed'. Count the number of nouns in this sentence.
Output: 3