Input: Sentence: 'A Train with yellow and red caboose cars passing through a town'. Count the number of nouns in this sentence.
Output: 3