Input: Sentence: 'An old fashioned train sitting next to a red brick building'. Count the number of nouns in this sentence.
Output: 3