Batch: Count occurences of string (from txt-file) in text-file and export to csv or txt-file : I have used different sources here on stackoverflow, for example [this][1], to clean my alarm file (data.txt) from spam and to extract the unique occurences to this file (unik.txt). The next step, where i am stuck, is to use unik.txt and count the number of occurences in data.txt, and to export the string and count to a text or csv-file.
As you may have guessed it is a way of creating an alarm statistic. I have considered using other methods/languages but will first want to try this way.

I have read [this][2] post also without coming to a close.
I will very much appreciate any assistance.
Cheers // DAN


  [1]: https://stackoverflow.com/questions/20246765/windows-batch-scripting-collect-unique-occurences-of-a-string-in-a-file
  [2]: https://stackoverflow.com/questions/9307187/how-to-find-the-number-of-occurrences-of-a-string-in-file-using-windows-command