Input: Sentence: 'a group of people walking beside a rail train'. Count the number of nouns in this sentence.
Output: 4