Input: Sentence: 'This dog is catching the frisbee  the owner threw to him'. Count the number of nouns in this sentence.
Output: 3