This is a good opportunity to use Window Functions:
create table names
(
id serial,
name text
);
insert into names (name)
values ('Alex'), ('Bob'), ('Bob'), ('Tim'), ('Alex'), ('Roger');
select distinct name, count(name) over (partition by name) as num,
round( (count(name) over (partition by name)::numeric /
count(name) over() ) * 100, 1) as pct
from names
order by num desc, name;
This results in output like the following:
NAME NUM PCT
Alex 2 33.3
Bob 2 33.3
Roger 1 16.7
Tim 1 16.7
You can tweak the rounding code if you want a slightly different format. You can also concatenate a % to the pct column value, but you would need to cast it to text first and the resulting column would be text as opposed to numeric (which may be fine for your case).
One big advantage this style of query has is that if your table gets more complex, and has more columns, you can still deal with that data, return it in queries even, and yet still get access to the count and percentage data due to the way Window Function scoping works. If you remove the distinct, you could also get it per-row even for the same name.
SQL Fiddle