Ah okay, that’s different.
You can use the L3 binning (Raster / Geometric Operations / Level-3 Binning) for this. But this includes a reprojection to WGS84. So you might not be able to use the result with your original data.
However, if you have a binary band with 0 and 1 values then you can use the average aggregator. If you don’t have such a band you can create one by creating an intermediate source at the bottom of the dialogue. Here you need to ensure that only the pixels are valid you want to count. In your case the cloud pixels, in the example image below the coastline pixels.
When configuring the aggregator you need to mark the checkbox ‘Output counts’.
This way is also not very accurate because it is not always a 5x5 window which is aggregated. The pixels don’t have a constant size over the scene.
If you want to count the pixels on the satellite pixels I think you would need to write some code. Either Java or Python. Have a look at our Developer Guide, if you like.
