Hello!

I need a little help. I'm trying to add an extra function to a quiz script.

The script is reading categories, questions and answers from a text file.
The question file consists of alternating lines of categories, questions and answers with no blank lines at the end.

What I would like to do is to make the script to count and list how many there are of each category in the question file.

I would like to make it look something like this:

Categories: Geography (2), History (1), Science (5), ...

Any help greatly appreciated.

Thanks.