select distinct count of a column in sql