Input: Sentence: 'A man riding a skateboard while playing on a guitar'. Count the number of nouns in this sentence.
Output: 3