Question: How to Calculate the Keyword Count in a Particular page in java. I want to Know the ALgo for that.

Answer: 
**Boyer-Moore String Search Algo**

If you want to talk about algorithm the string search algorithm famous is [Boyer-Moore String search algorithm](http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm).

A Java based implementation of Boyer-Moore can be found at <http://algs4.cs.princeton.edu/53substring/BoyerMoore.java.html>

---

**KMP Algorithm**

Another algorithm which can search with substring too is [Knuth-Morris-Pratt(KMP) algorithm](http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm).

A Java based implementation of KMP can be found at 
<http://tekmarathon.wordpress.com/2013/05/14/algorithm-to-find-substring-in-a-string-kmp-algorithm/>
Load the HTML into a String and you're good to go. Answer to you next question is right [here](https://stackoverflow.com/questions/767759/occurences-of-substring-in-a-string).