Input: Sentence: 'A train traveling over a bamboo bridge through a jungle'. Count the number of nouns in this sentence.
Output: 4