Input: Sentence: 'A red motorcycle on a carpet inside of a house'. Count the number of nouns in this sentence.
Output: 3