Find repeated count from input data stream... 
<p>I have tried several time but couldn’t find the way to solve my problem. Here my txt file shown in below.</p>

<pre><code>695
748
555
695
748
852
639
748
</code></pre>

<p>I put the for loop to read the data and put them in to array. So now I want to filter repeat numbers from the input txt data. How can I have a count of repeated data. </p>

<pre><code>    static void Main(string[] args)
    {
        int x = 0;
        int count = 0;
        String[] line = File.ReadAllLines("C:/num.txt");
        int n = line.Length;
        String[] res = new String[n];
        for (int i = 0; i &lt; n; i++)
        {

            res[i] = line[i].Substring(x,x+8);
                Console.WriteLine(res[i]);
        }

        Console.ReadLine();

    }
</code></pre>
