Input: Sentence: 'Two horses are walking a carriage through the streets'. Count the number of nouns in this sentence.
Output: 3