title: Counting records with single and multiple categories
body: <p>I have these records in my table</p>
  
  <pre><code>researchID | category
        19        math
        20        math
        21        math
        22        math
        22        history
        23        math
        23        english
        24        math
        24        english
  </code></pre>
  
  <p>with this query: SELECT researchID, GROUP_CONCAT(DISTINCT category_id SEPARATOR "|") as category FROM <code>tbl_submission_categories</code> GROUP BY researchid. my result is this</p>
  
  <pre><code> researchID | category
        19        math
        20        math
        21        math
        22        math|history
        23        math|english
        24        math|english
  </code></pre>
  
  <p>but the result that i want is this</p>
  
  <pre><code>research_count | category
        3           math
        1           math|history
        2           math|english
  </code></pre>
  
  <p>what sql query do i need?</p>