Input: Sentence: 'Several black and white sheep near a sofa in a field'. Count the number of nouns in this sentence.
Output: 3