Input: Sentence: 'A person with a hat sitting next to the water'. Count the number of nouns in this sentence.
Output: 3