Input: Sentence: 'a black and white dog laying on the ground with a frisbee'. Count the number of nouns in this sentence.
Output: 3