Input: Sentence: 'A dog is in the grass trying to catch a frisbee'. Count the number of nouns in this sentence.
Output: 3