Input: Sentence: 'A traffic light hanging from a metal pole'. Count the number of nouns in this sentence.
Output: 4