title: How to combine tablenames if equal and count columns SQL
body: <pre><code>SELECT Tabname, Colname 
    FROM Systemcatalog 
   WHERE Tabschema = 'X'
  </code></pre>
  
  <p>Giving me</p>
  
  <pre><code>Tabname, Colname
  A         X1
  A         Y1
  A         Z1
  B         X2
  C         X3
  C         Y2
  C         Z2
  ... 
  </code></pre>
  
  <p>But What I need is:</p>
  
  <pre><code>Tabname, Colnum
  A         3
  B         1
  C         3
  ...
  </code></pre>
  
  <p>so counting all columns for each table putting it in a new column and at the same time delete double elements in tabname.         </p>