Input: Sentence: 'Some small boys with hats are in a garden'. Count the number of nouns in this sentence.
Output: 3