Input: Sentence: 'A dog carrying a Frisbee at a dog competition'. Count the number of nouns in this sentence.
Output: 3