Input: Sentence: 'A man petting a horse's face while a woman stands behind next to another horse'. Count the number of nouns in this sentence.
Output: 5