Input: Sentence: 'A bench next to a tree on a hill'. Count the number of nouns in this sentence.
Output: 3