title: Counting duplicate cells on multiple rows and columns with Google Spreadsheet
body: <p>So with Google Apps Script, I have a spreadsheet as following:</p>
  
  <pre><code>A       B       C...
  apple   banana  orange...
  banana  orange  grape...
  banana  apple   orange...
  ...     ...     ...
  </code></pre>
  
  <p>...and I want to make it like this:</p>
  
  <pre><code>apple   2
  banana  3
  grape   1
  orange  3
  </code></pre>
  
  <p>What would be the easiest way to make this possible?</p>
  
  <p>I have tried to use query function on Google Apps Spreadsheet, but since there are multiple columns it is difficult to sort and count. I have also tried to use join and countif function but it tend to get redundant since there are too many columns.</p>
  
  <p>Need help!</p>