Input: Sentence: 'The blue locomotive has no other cars on it'. Count the number of nouns in this sentence.
Output: 2