Input: Sentence: 'A red train on a group of tracks beneath a blue bridge'. Count the number of nouns in this sentence.
Output: 4