Input: Sentence: 'There are two people in the room with a dog'. Count the number of nouns in this sentence.
Output: 3