Input: Sentence: 'Five horse stand lined up in the distance'. Count the number of nouns in this sentence.
Output: 3