title: Counting DISTINCT over multiple columns
body: <p>Is there a better way of doing a query like this:</p>
  
  <pre><code>SELECT COUNT(*) 
  FROM (SELECT DISTINCT DocumentId, DocumentSessionId
        FROM DocumentOutputItems) AS internalQuery
  </code></pre>
  
  <p>I need to count the number of distinct items from this table but the distinct is over two columns.</p>
  
  <p>My query works fine but I was wondering if I can get the final result using just one query (without using a sub-query)</p>