Part 1. Definition
In this task, you need to count the number of words in a sentence that start with the given letter. Answer with numbers and not words.
Part 2. Example
Sentence: 'a hot dog in a bun with ketchup on a plate with french fries'. How many words start with the letter 'a' in the sentence.
Answer: 3
Explanation: The word 'a' is the only word that starts with 'a'. This sentence has 3 occurrences of the word 'a'. So, the answer is 3.
Part 3. Exercise
Sentence: 'two plates with hot dogs pickles and tater tots on them'. How many words start with the letter 'p' in the sentence.
Answer:
2