Given the following list the count and distinct count will be different.
1,3,7,8,4,2,7,3,4,7
The count is 10.
The distinct count is 6 as the numbers 3,7,4 are repeated so only counted once.
It is done in SQL by placing DISTINCT inside the aggregate.
SELECT count(id) from tbl;
SELECT count(DISTINCT id) from tbl;