ImageLevels
ImageLevels[image] gives a list of pixel values and counts for each channel in image.
ImageLevels[image,bspec] bins pixel values using bin specification bspec.
ImageLevels[image,bspec,range] gives counts for bins in the given range.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.