Input: Sentence: 'This is a black and white photo of a train sitting on the tracks'. Count the number of nouns in this sentence.
Output: 3