Input: Sentence: 'A blue and black bird walking across a dirty field'. Count the number of nouns in this sentence.
Output: 2