I do something very similar with my apps for levels. I use the string of levelCleared for my webstorage. I create and pick apart that string with arrays.
In other words, I have an array called arCleared, I populate that array with the values from the LevelCleared String.
For Each X of arCleared
------Set Value at arCleared.curX to tokenat(LevelCleared, arCleared.CurX, ",")
Now you have an array populated with your levelcleared data.
For each X of arCleared
If arCleared.at(arCleared.curx) = 1 then add 1 to a variable
Then just compare that variable to the number you want for all levels to be complete.
Might be a simpler way, but I like the versatility of arrays and having all my level info stored in one :).