Cross Apply without a function
SELECT 
  GroupValue = Val, 
  [Count] = COUNT(DISTINCT MyGroup) 
FROM 
(
  SELECT MyGroup, Val = STUFF((SELECT ', ' + RTRIM(MyValue) 
   FROM dbo.MyTable 
   WHERE MyGroup = t.MyGroup 
  FOR XML PATH(''), TYPE).value('.[1]','nvarchar(max)', 1, 2, '')
  FROM dbo.MyTable AS t
) AS x 
GROUP BY Val;