Input: Sentence: 'Two dogs are running together and one of them has a frisbee'. Count the number of nouns in this sentence.
Output: 2