Dear Eric,
Thank you very much for your help, I think it could be very useful, but I think Zonal histogram is only available with ArcGIS10 and I have the version 9.3.1.
On the other hand, I also need to know the number of pixels for each cluster with the same color.
For instance, in the image attached, I would need to know how many green pixels I have (this is easy), but the most difficult is to know how many yellow pixels I have in each yellow cluster.
The most problematic thing is that if you have a polygon feature, ArcGIS, only identify groups of pixels with the same value, in such a case color, and those which share some side each other, but not some vertex. In my case, the group of yellow pixels bold with a blue line should belong to the other group of yellow pixels located bellow but it is not because the two groups only share a vertex of one pixel instead of the whole side.
yours sincerely,
Guillem