Use Tableau's built-in Create Group feature
View and download the solution workbook on Tableau Public: https://public.tableau.com/profile/fosstin#!/vizhome/HowtoGroupYourDatainTableau/Dashboard-HowtoGroupYourData
1. Create a group by right-clicking the Item dimension and selecting Create > Group. The Create Group dialogue box will appear.
2. Enter a name for your grouped dimension in the Area Name text field at the top of the window, or use Tableau's default title, Item (group)
3. Click the Group button after selecting the first set of letters you want to group. Hold down the control or shift key to select several rows.
4. Press enter after giving the group a name (for example, A-C).
5. To make the D-F and G-H groupings, repeat steps 5 and 6, then click OK.
6. In the Marks card, drag the Item (group) dimension to the Rows shelf and the Count measure to Text.
7. Double-click Measure Values in the data window to add a column header to the Count column.
8. Format the Measure Values pill on the Marks card by right-clicking it. Then select Numbers > Number in the formatting box (Standard)
References:
Tableau Help: Group Your Data
https://help.tableau.com/current/pro/desktop/en-us/sortgroup_groups_creating.htm#create-a-group-from-a-field-in-the-data-pane
Tableau.com Blog: The one-click trick for create headers for single-measure tables
https://www.tableau.com/about/blog/2015/11/how-create-fast-headers-single-measure-tables-45945