Input: Sentence: 'A man flying through the air while riding a snowboard'. Count the number of nouns in this sentence.
Output: 3