mysql count and then group by that count
<p>I have a table structured like this:</p>

<pre><code>user_id   saved_id
1         2
1         34
1         36
2         489
2         14
3         731
4         48
5         901
6         234
6         9
6         64
</code></pre>

<p>What I would like to do is first count how many saved ids each user has, and then group these results so that I know how often each total_saves occurs.</p>

<p>This is what I currently have:</p>

<pre><code>SELECT user_id, count(*) as total_saves FROM table GROUP BY user_id ORDER BY total_saves DESC
</code></pre>

<p>Which gives me</p>

<pre><code>user_id   total_saves
1         3
6         3
2         2
3         1
4         1
5         1
</code></pre>

<p>What I would like to have is this:</p>

<pre><code>total_saves   count
3             2
2             1
1             3
</code></pre>

<p>Can't get my head around how to group the total_saves that I already have. I tried <code>GROUP BY total_saves</code> but that doesn't work.</p>