title: Counting how many fields are the same in a row
body: <p>I have data in a table organised as follows:</p>
  
  <pre><code>ID, name1, name2, name3, name4, name5, name6
  </code></pre>
  
  <p>Sample data  </p>
  
  <pre><code>select ID, name1, name2, name3, name4, name5, name6
  from datatable
  
  123, bob, mark, jane, bob, jane, fred  
  124, mark, mark, mark, bob, bob, bob
  </code></pre>
  
  <p>and I need to end up with something like</p>
  
  <pre><code>123, bob,  2  
  123, mark, 1  
  123, jane, 2  
  123, fred, 1  
  124, mark, 3  
  124, bob,  3  
  </code></pre>
  
  <p>Where the count is the number of times a name appears in the record. Is this possible?</p>