Input: Sentence: 'The front of a train driving under a bridge'. Count the number of nouns in this sentence.
Output: 4