I can make an example later, don't have C2 in front of me.
But basically just think of an array as a spreadsheet, pretty simple. You can have one column for each level, and 3 rows which represent each star. In each cell, a 0 would represent not collected, and a 1 would be collected.
When you collect a star, you would set that star's position in the array to 1. This way, if it was 0 before, it would change to 1, and if it was already 1, nothing would change.
Then run a loop in the array, for each xy, that adds everything in the array. That would give you your collected star count.
Example to come tomorrow!