Input: Sentence: 'A kid in the grass swinging a baseball bat'. Count the number of nouns in this sentence.
Output: 4