Input: Sentence: 'A motorcycle with attached seats outside a building'. Count the number of nouns in this sentence.
Output: 3