title: spark count and filtered count in same query
body: <p>In SQL something like </p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT  count(id), sum(if(column1 = 1, 1, 0)) from groupedTable
  </code></pre>
  
  <p>could be formulated to perform a count of the total records as well as filtered records in a single pass.</p>
  
  <p>How can I perform this in spark-data-frame API? i.e. without needing to join back one of the counts to the original data frame.</p>