select count(*) as how_many,name from your_table group by name order by how_many DESC
this should solve your problem.
this query counts how many same names are there and orders them descendig...
result is a table with two columns
17 | Joe
14 | Bill
10 | Peter
10 | Vlado
have a nice day...
Ivan