title: How to get count-of-a-count with dplyr?
body: <p>Let's say we have the data frame</p>
  
  <pre><code>df &lt;- data.frame(x = c("a", "a", "b", "a", "c"))
  </code></pre>
  
  <p>Using dplyr count, we get</p>
  
  <pre><code>df %&gt;% count(x)
  
    x n
  1 a 3
  2 b 1
  3 c 1
  </code></pre>
  
  <p>I now want to do a count on the resulting n column. If the n column were named m, the result I'm looking for is</p>
  
  <pre><code>  m n
  1 1 2
  2 3 1
  </code></pre>
  
  <p>How can this be done with dplyr?</p>
  
  <p>Thank you very much!</p>