SELECT COUNT(*) FROM ( SELECT ID, COUNT(*) AS CNT FROM TABLE_A GROUP BY ID ) as COUNTS WHERE CNT = 1