Input: Sentence: 'A cyclist pedals past a flock of birds perched on a grating'. Count the number of nouns in this sentence.
Output: 5