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

Example Input: Sentence: 'A small white and brown dog carrying a red frisbee'. Count the number of nouns in this sentence.
Example Output: 2

Example Input: Sentence: 'a table with a drink some flowers an ashtray and a pizza'. Count the number of nouns in this sentence.
Example Output: 5

Example Input: Sentence: 'A white fishing boat is on the water not far from a beach'. Count the number of nouns in this sentence.
Example Output:
4