title: Count same values in different column mysql
body: <p>I need to count how many times in ripeted the same values in different columns for the same id.. 
  I'll try to clarify with an example:
  <strong>TABLE:</strong></p>
  
  <pre><code>+-----+-----+-----+-----+-----+
  |  id | d01 | d02 | d03 | d04 |
  +=====+=====+=====+=====+=====+
  |  1  |  A  |  A  | B   |  B  | 
  +-----+-----+-----+-----+-----+
  |  2  |  A  |  A  |  A  |  A  | 
  +-----+-----+-----+-----+-----+
  |  3  |  B  |  B  |  A  |  A  | 
  +-----+-----+-----+-----+-----+
  |  4  |  A  |  A  |  A  |  A  | 
  +-----+-----+-----+-----+-----+
  |  5  |  A  |  A  |  A  |  A  | 
  +-----+-----+-----+-----+-----+
  |  6  |  B  |  A  |  A  |  A  | 
  +-----+-----+-----+-----+-----+
  </code></pre>
  
  <p>I need to know how many times the value "<strong>B</strong>" is repeating for <strong>any person (ID)</strong>..</p>
  
  <p>Is that possible to do that? <strong>RESULTS</strong></p>
  
  <pre><code>+-----+-----+-----+
  |  id |  count B  |
  +=====+=====+=====+
  |  1  |     2     |
  +-----+-----+-----+
  |  2  |     0     |
  +-----+-----+-----+
  |  3  |     2     |
  +-----+-----+-----+
  </code></pre>
  
  <p>I was thinking to use the function "SUM" but I have no idea how to display just the single ID.
  Thanks in advance, hope the question is clear enough! </p>