Input: Sentence: 'Two cows lie in a field with a mountain in the background'. Count the number of nouns in this sentence.
Output: 4