Input: Sentence: 'A train segment stopped on train tracks in a field'. Count the number of nouns in this sentence.
Output: 5