Input: Sentence: 'A man rides a bicycle on a street in a city'. Count the number of nouns in this sentence.
Output: 4