Try the following approach:
1. Read in the list of stop words and store them in a
Map (Java Platform SE 7 )[
^] with stop word as the key and its count as the value starting at 0. Increase the value by one whenever that stop word is found in the corpus.
2. Read in the corpus text file line by line, for each line, scan for any stop words stored as keys in the Map collection created in step 1, remove it from that line and save that line to a new text file, not to forget to increase the count of that stop word found in the Map collection.
On the coding part, ask Google as it has plenty of examples, specifically, look for string manipulation and file I/O.