select distinct count postgres