i need to find the number of occurences of a specific word in a text but I don't know what to do. I've got the part where it searches and higlights the words but not how to count them, please help.

Every time it highlights the word, augment a counter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.