title: How to count distinct values in SQL union?
body: <p>I can select distinct values from two different columns, but do not know how to count them.
  My guess is that i should use alias but cant figure out how to write statement correctly.</p>
  
  <pre><code>$sql =  "SELECT DISTINCT author FROM comics WHERE author NOT IN 
                  ( SELECT email FROM bans ) UNION
                  SELECT DISTINCT email FROM users WHERE email NOT IN 
                  ( SELECT email FROM bans ) ";
  </code></pre>
  
  <p>Edit1: i know that i can use <code>mysql_num_rows()</code> in php, but i think that takes too much processing.</p>