You can get by without creating the extra temp table...
SELECT d.Name,t.N*10 AS DeciCount
FROM (SELECT Name,COUNT(*) AS TheCount
FROM #Name
GROUP BY Name) d
INNER JOIN dbo.Tally t
ON t.N <= d.TheCount
GoFigureFW... if you don't know what a Tally table is, please see the following link...
http://www.sqlservercentral.com/articles/TSQL/62867/
--Jeff Moden
Change is inevitable... Change for the better is not.