Input: Sentence: 'A man in a red jacket is on a motorcycle'. Count the number of nouns in this sentence.
Output: 3