title: SqlAlchemy: count of distinct over multiple columns
body: <p>I can't do:</p>
  
  <pre><code>&gt;&gt;&gt; session.query(
          func.count(distinct(Hit.ip_address, Hit.user_agent)).first()
  TypeError: distinct() takes exactly 1 argument (2 given)
  </code></pre>
  
  <p>I can do:</p>
  
  <pre><code>session.query(
          func.count(distinct(func.concat(Hit.ip_address, Hit.user_agent))).first()
  </code></pre>
  
  <p>Which is fine (count of unique users in a 'pageload' db table).</p>
  
  <p>This isn't correct in the general case, e.g. will give a count of 1 instead of 2 for the following table:</p>
  
  <pre><code> col_a | col_b
  ----------------
    xx   |  yy
    xxy  |  y
  </code></pre>
  
  <p>Is there any way to generate the following SQL (which is valid in postgresql at least)?</p>
  
  <pre><code>SELECT count(distinct (col_a, col_b)) FROM my_table;
  </code></pre>