Thankyou to all who went after this brain teaser. Wow, for such a simple thing, it turned into a quite complex query. I did use the version from SQLSister, as it was the shortest and easiest:-).
SELECT ColumnA, ColumnB, COUNT(*) AS NbrOfRows into #temp
FROM table
GROUP BY ColumnA, ColumnB...