In next part of code I implemented a loop, using 'while' method, which takes one element from elementsTable and shows it on screen/console. I want to add method which will count those elements. For instance, if I will take elementB three times, the elementBCounter will have value 3. Of course I can do it manually creating 'if...else' methods for each elementXCounter and element from my table. But it will be impractical for let say about 20 elements. I want to make it more automatic.

As you can see on example, the elements names in table and names of Int variables differ only in Counter word which is added to Int variables names. My idea is, after drawing lots from table i can add to it's name 'Counter' word - in that way i will have a name of my Int variable. The problem is, that it will be still a String, not Int. I tried to do sth like this:

What i tried to do was:
1) Get a random element from Table.
2) Add 'Counter' to its name. So if i have taken elementA i created elementACounter.
3) I tried to change it to Int.
Of course, it doesn't work.

My question is:
How to connect/link a String name (a name of some element from Table) with the name of Int variable? Couse I want to use this Int in iterations.
Or giving a programming problem: If you have taken elementA from Table, increase elementACounter by 1 (without creating a lot os loops and conditional functions).