Input: Sentence: '4 people on horseback move along the beach'. Count the number of nouns in this sentence.
Output: 4