Input: Sentence: 'a four-legged animal grazes on the side of a hill in a forest'. Count the number of nouns in this sentence.
Output: 4