Input: Sentence: 'A barge floating down a river towards a city'. Count the number of nouns in this sentence.
Output: 3