Input: Sentence: 'A train on a track in the middle of a neighborhood'. Count the number of nouns in this sentence.
Output: 4