The task description says that words should not be part of other words, but the accepted solution does not follow this.
As a particular example:
count_words("Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.",["far","word","vokal","count","tries"])
The accepted answer is 5, but this means that "countries" matches both "count" and "tries", which are overlapping.
Created at: March 5, 2022, 10:14 p.m.; Updated at: March 5, 2022, 10:55 p.m.