Input: Sentence: 'Three boats docked next to a shore in water'. Count the number of nouns in this sentence.
Output: 3