Input: Sentence: 'Painting of a large elephant walking through an open field by itself'. Count the number of nouns in this sentence.
Output: 3