Input: Sentence: 'a man rowing his kayak with his pet dog'. Count the number of nouns in this sentence.
Output: 3