Input: Sentence: 'a horse pulls a cart with people sitting on it'. Count the number of nouns in this sentence.
Output: 3