Try this code
SELECT count(*) AS duplicate_count FROM ( SELECT name FROM tbl GROUP BY name HAVING COUNT(name) > 1 ) AS t
how we can retrieve the unique values for the in a table without using the DISTINCT keyword