The following SQL query will return all the rows that have a duplicate value for the column someColumn. The number of duplicates is stored in the OccurCount variable.
SELECT someColumn COUNT(someColumn) AS OccurCount FROM someTable GROUP BY someColumn HAVING (COUNT(someColumn) > 1);