title: MySQL: counting two fields
body: <p>I have a table that looks like this:</p>
  
  <pre><code>Pizza  ----|| Topping 
  ====================
  Cheese--||    Olives
  ====================
  Ham-----     || Tuna
  ====================
  Cheese-- || Olives
  ====================
  Cheese-- || Tuna
  ====================
  </code></pre>
  
  <p>I would like to obtain the number of pizzas of each type, so in the table above  there would be one ham pizza, and 2 cheese pizzas (since cheese+olives is repeated and should be counted only once). Basically, I need to count each row for each two equal elements and group by pizza.</p>
  
  <p>The result from that query should be:</p>
  
  <pre><code>Pizza  ----|| Count
  ====================
  Cheese--||    2
  ====================
  Ham-----     || 1
  ====================
  </code></pre>
  
  <p>Thanks!</p>