Input: Sentence: 'A plane flying overhead with palm trees in the background'. Count the number of nouns in this sentence.
Output: 4