Input: Sentence: 'A dog is chasing a ball in the water'. Count the number of nouns in this sentence.
Output: 3