In this task, you need to count the number of nouns/verbs in the given sentence.

Example Input: Sentence: 'The display has many towers of stacked cookies next to trays full of cookies'. Count the number of nouns in this sentence.
Example Output: 5

Example Input: Sentence: 'A group of men leaning over rail as a dog approaches them'. Count the number of verbs in this sentence.
Example Output: 2

Example Input: Sentence: 'A person swings their arms with a bat in hand'. Count the number of nouns in this sentence.
Example Output:
4