how to count rows grouped by text

I have a data like this:
1, text3
2, text2
3, text1
4, text1
5, text2
6, text1

And how to count rows grouped by text?
I want to get:
text1 - count 3
text2 - count 2
text3 - count 1

I can't change my data order, because I have group header in my report grouped by some condition.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.