Perhaps start with the Control block
for each in list

Runs the blocks in the do section of for each item in the list. Use the given variable name, item, to refer to the current list item. You can change the name item to something else if you wish.
Put your IF statements there , do the counting and 'save' the results to a global variable perhaps.
To solve this "The categories are not fixed so I can't make one variable that will stored each category and add one (I would need a not fixed number of variables" you will have to experiment. The for each item block will help the situation where the lists are of variable length. The other control block that might help within the for each item block is the
for each from to

Runs the blocks in the do section for each numeric value in the range starting at from and ending at to, incrementing number by the value of by each time. Use the given variable name, number to refer to the current value. You can change the name number to something else if you wish.
where, in the to puzzle piece to you place in the to slot is code like length of list xxxxx where xxx is the length of the list. ... from 1 by 1 also need to be filled.
Try some blocks. If you run into difficulty, post what you tried and someone will probably provide some specific advice.
Regards,
Steve