You are absolutely correct that you cannot use a group in a calculated field. However, you can use a calculated field to accomplish grouping and then another calculation to do the counts.
You might try a calculation like this:
CASE [Company Name] WHEN "ABC" THEN "Group 1" WHEN "DEF" THEN "Group 1" WHEN "GHI" THEN "Group 2" ... WHEN "XYZ" THEN "Group 10" END
Then another calcluation:
COUNTD([Company Group]) to count the group.
Hope that helps!
Another option is to set up a mapping table and either use that in a multiple tables connection or a data blend. I've found Tableau's ad-hoc groups to be wonderful for exploratory analysis, but given this limitation about use in calculated fields I'll move that linking into mapping tables (also called dimension tables) in the data source.