PHP+SQL ORDER by count

Hello
I have database table like that:
userid|value

and the data goes like that:
1|something
1|dsfs
1|ds
2|ffffew
2|dfsdf
etc…

I want to make SQL query that will order this results by the user with the most values
if userid 1 has 6 rows included his id, and it’s the highest (no more users with more than 6 rows) it will show him first.

I am using PHP.

–Thanks in advance


SELECT userid, COUNT(userid) AS cnt FROM your-table-name GROUP BY userid ORDER BY cnt DESC