Input: Sentence: 'A dog and cat sharing an animal bed in a house'. Count the number of nouns in this sentence.
Output: 5