How to check number of instances of a domain in a text file
<p>I have a text file containing domains like</p>

<pre><code>ABC.COM
ABC.COM
DEF.COM
DEF.COM
XYZ.COM
</code></pre>

<p>i want to read the domains from the text file and check how many instances of domains are there.
Reading from a text file is easy but i am confused at how to check number of instances of domains.
Please help.</p>
