7. The Menus / 7.6 The Tool Menu
This function counts the number of colors used in an image layer. If Document is on, the colors in all image layers of the document are counted.
You use this function, if you want to save an image in a file format supporting color palettes (BMP, PNG, GIF). Palettized images should normally use 256 colors or less. If you save an image with 256 colors at the most in one of those formats, the resulting file will be remarkable smaller.