title: How to do count(*) within a spark dataframe groupBy
body: <p>My intention is to do the equivalent of the basic sql</p>
  
  <pre><code>select shipgrp, shipstatus, count(*) cnt 
  from shipstatus group by shipgrp, shipstatus
  </code></pre>
  
  <p>The examples that I have seen for spark dataframes include rollups by other columns: e.g.</p>
  
  <pre><code>df.groupBy($"shipgrp", $"shipstatus").agg(sum($"quantity"))
  </code></pre>
  
  <p>But no other column  is  needed in my case shown above.  So what is the syntax and/or method call combination here?</p>
  
  <p><em>Update</em>  A reader has suggested this question were a duplicate of <a href="https://stackoverflow.com/questions/32119936/dataframe-how-to-groupby-count-then-filter-on-count-in-scala">dataframe: how to groupBy/count then filter on count in Scala</a>  : but that one is about filtering by <code>count</code> : there is no filtering here.</p>