Input: Sentence: 'A seagull on a pier with boats in the water in background'. Count the number of nouns in this sentence.
Output: 5