Calculate how many different colors are in the picture:
In[2]:=
Length@Union@Flatten[ImageData[img],1]
Out[2]=
31944
Increasing the speed and quality of color quantization impacts export to image file formats such as "GIF" that perform quantization. Export the current image to GIF and check the size of the output file: