Input: Sentence: 'An old western town with people and horses'. Count the number of nouns in this sentence.
Output: 3