Input: Sentence: 'A traffic light is near a red bus and a building'. Count the number of nouns in this sentence.
Output: 4