take lots of screenshots from different parts of the same level, combine them all into one image and count the colours in that. do that for every level and choose what you think is the most representative number (maximum, mean, median? I don't know)