Input: Sentence: 'A group of goats resting on dirt'. Count the number of nouns in this sentence.
Output: 3