It seems not a CRW question. Try approach the issue in the SQL Level.
Change your query to
SELECT DISTINCT System, Component, Item, Module, Count(*) AS [counter]
FROM Table1
GROUP BY System, Component, Item, Module;
If you are using SQL server, Oracle, you may create a view to simplify the...