title: C# - How many times a specific int value appears in array? No Linq tech
body: <p>Have seen many answers on SO, but could not find an appropriate.</p>
  
  <p>I need an efficient algorithm or perhaps method in C# to count <em>how many times a specific int value appears in array</em>. <strong>Without Linq</strong>. The size of array is >= 100 and each element is not greater than 100</p>
  
  <p>Having this code:</p>
  
  <pre><code>    for (int i = 0; i &lt; 100; i++)   // get each number for counting
      {
         counter = 0;                 // zero counter for next number comparison
  
         for (int a = 0; a &lt; array.Length; i++) 
         {
              if (i == array[a])
              {
                  counter++;
                  if (max &lt; counter) max = counter;   // save max-appeared num
              }   
         }
      }
  </code></pre>
  
  <p>It displays me as result message "Terminated due to timeout" in test challenge. I suppose this code needs much time to be solved. Is there any alternative for this?</p>