The layer solution is good in several ways. In addition to being simple and not requiring a macro, I can get a quick as easy summary of the counts in all of the layers with a single click. (I have the layer icons on the Quick Access Toolbar.)
My current need involves a grid that can get as large as 100x100. The fill in each individual cell is set to one of several colors. I need to get a count of the number of cells of each color. The colors are in patches. So I can define a layer for each color and set them all to "not visible". Then using the lasso tool, which I just learned how to use on another thread, I can grab a patch near the edge of the grid. As I assign those cells to their layer, they disappear from view and I can then grab the next outermost patch. I was able to get an accurate count in just a few minutes.
Sometimes actually work well!
