Input: Sentence: 'A duck swimming on a lake next to other ducks'. Count the number of nouns in this sentence.
Output: 4