Input: Sentence: 'A motorcycle parked next to a parked red car under trees'. Count the number of nouns in this sentence.
Output: 3