Input: Sentence: 'A man with a funny hat on a big pretty horse'. Count the number of nouns in this sentence.
Output: 3