select count distinct id from table