calculating standard deviation of a grid

Dear Gembud,

Does anyone know of a way to calculate the standard deviation of a specific grid using GDLIST? There is a function to give you the average of a scalar grid over the GAREA, but I don't see a way to specify a GFUNC that can calculate the standard deviation. Actually, the only missing link I need is to find the number of non-missing grid points in the array. I haven't identified such a utility though.
Also, I've looked at the GDSTAT program, but that give you statistics at each 
individual grid point over a range of times, not stats for a while grid.

Your feedback is most welcome!
Jonathan