How to get the total of the same or similar numbers or letters

what components are used to make it. as follows. For example, in a written sentence there is a word. (banana banana orange apple grape) in the sentence there are 2 words banana. the result is 2 banana number words. i want to get the following values. I want to make something like Replace the text in Google Document. get the results / total of all replaced text

Use these ‘text’ blocks. Understand them, implement them.

Use these ‘lists’ blocks with ‘text’ blocks. They are great for your project and give good results.