Detecting percentage of BitmapData that is transparent

Say you have an image like this:

Is there any way of checking what percentage of the BitmapData is filled, and what percentage is transparent?

You could easily brute-force it by looping through each pixel and counting which ones are empty, but does anyone have a more elegant solution?