Input: Sentence: 'A man riding a skateboard next to a dividing rail next to a street'. Count the number of nouns in this sentence.
Output: 5