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

Example Input: Sentence: 'A man laughs while sitting on a bench'. Count the number of nouns in this sentence.
Example Output: 2

Example Input: Sentence: 'A cut in half sandwich sitting on top of a table next to a foam container'. Count the number of nouns in this sentence.
Example Output: 6

Example Input: Sentence: 'A group of young people walking along  a beach with a dog'. Count the number of nouns in this sentence.
Example Output:
4