Input: Sentence: 'The brown bear is alone caged outside for people to visit'. Count the number of nouns in this sentence.
Output: 2