Input: Sentence: 'A train riding through a city neighborhood'. Count the number of nouns in this sentence.
Output: 3