Yes, have an array that would denote how many of each item you've found. Since you are only classifying numbers [0-9] and all others as it's own category, you'd have 11 categories.

Then, you can...