Input: Sentence: 'A woman posing with a bat and wearing a batting helmet'. Count the number of nouns in this sentence.
Output: 4