Input: Sentence: 'A pet enclosure with grass and a fire hydrant'. Count the number of nouns in this sentence.
Output: 4