Input: Sentence: 'A police dog is sniffing bags on the ground'. Count the number of nouns in this sentence.
Output: 4