howto count occurances of text within text file in c#
<p>I have a text file which will look like this</p>

<p>:Hand 1:<br>
:Hand 2:<br>
:Hand 4:<br>
:Hand 3:<br>
:Hand 3::Hand 1:<br>
:Hand 2:<br>
:Hand 1:<br>
:Hand 4:<br>
:Hand 4:<br>
:Hand 3:<br>
:Hand 3:<br>
:Hand 3::Hand 4:<br></p>

<p>So now what I want to know is how do I get the maximum count of lines which contain :Hand 3: </p>

<p>eg at first its 2<br>
:Hand 4:<br>
:Hand 3:<br>
:Hand 3::Hand 1:<br><br>
then its 3<br>
:Hand 4:<br>
:Hand 3:<br>
:Hand 3:<br>
:Hand 3::Hand 4:<br></p>

<p>so i want this code to then return 3, if i then wanted :Hand 4: it will be 2 here</p>

<p>:Hand 1:<br>
:Hand 4:<br>
:Hand 4:<br></p>

<p>the double :Hand1::Hand2: is because sometimes there will be 2 hands per line in text file</p>
