Input: Sentence: 'A man walking his dog along side of three brown cows'. Count the number of nouns in this sentence.
Output: 4