I am using mysql and php.
I have a table with one column. I can show unique rows by:
select distinct id from id_table
This might show<
select id, count(id) from table group by id
If only want count of ids, then
select count(id) from table group by id
Here is a simple tutorial of group by clause
http://www.w3schools.com/sql/sql_groupby.asp