title: Count rows where one column has two values in Hive
body: <p>I have a column in a table which entries look like this:</p>
  
  <pre><code>"a=2&amp;a=4&amp;time=2016"
  "a=2"
  "p=14&amp;a=4"
  </code></pre>
  
  <p>I want to extract occurrences of "a=X", group by X and count rows for distinct values.</p>
  
  <p>So the result for above example would be:</p>
  
  <pre><code>a=X | count
  ----------
  a=2 | 2
  a=4 | 2
  </code></pre>
  
  <p>How can I do this? </p>