title: How to display how many times an array element appears
body: <p>I am new to C# and hope I can get some help on this topic. I have an array with elements and I need to display how many times every item appears.</p>
  
  <p>For instance, in <code>[1, 2, 3, 4, 4, 4, 3]</code>, <code>1</code> appears one time, <code>4</code> appears three times, and so on.</p>
  
  <p>I have done the following but don`t know how to put it in the foreach/if statement...</p>
  
  <pre><code>int[] List = new int[]{1,2,3,4,5,4,4,3};
  foreach(int d in List)
  {
      if("here I want to check for the elements")
  }
  </code></pre>
  
  <p>Thanks you, and sorry if this is a very basic one...</p>