Input: Sentence: 'A man that has a baseball bat in the dirt'. Count the number of nouns in this sentence.
Output: 4