Input: Sentence: 'A large flock of sheep in the middle of the road'. Count the number of nouns in this sentence.
Output: 4