Input: Sentence: 'Four different colors of motorcycles are lined up against a fence'. Count the number of nouns in this sentence.
Output: 3