Could you show an example of source and result?
What is this all about anyway?
In any case I doubt such a task can be easily autimated in Photoshop.
Not my field of experience or expertise, but I think going 3D is a waste for measuring in this instance.
If you can isolate the »peak«-areas (via a Filter for example) determining their number and luminance values might be automateable with a Script, I guess.
But hopefully someone else has to offer more insight or actual experience with something like this.
Come to think of it, might the Histogram not also be of use here?
Naturally that would not evaluate the number of spots but only the number of pixels of specific luminances, but I’m not sure which of the factors are most important for you.