Part 1. Definition
In this task, you need to count the occurrences of the given word in the given sentence.
Part 2. Example
Sentence: 'the brown cat sits perched on atop of the bed peering forward'. Count the occurrences of the word 'the' in the given sentence.
Answer: 2
Explanation: The word 'the' appears two times in the given sentences. So, the answer is 2.
Part 3. Exercise
Sentence: 'a golden colored shar pei dog and a dog of indescribable heritage sitting on dog bed'. Count the occurrences of the word 'dog' in the given sentence.
Answer:
3