Input: Sentence: 'A herd of cattle running behind a dog on a field'. Count the number of nouns in this sentence.
Output: 4