If you convert the selection to a path (or if you just create the path around the object), I have a script to export the path (its "anchor" points, in particular) to a CSV file: see here.
The "Histogram" dialog (and the gimp_histogram() function for scripts) can tell you several things about the selection (count of pixels (all or within specified range), etc...).
The "Histogram" dialog (and the gimp_histogram() function for scripts) can tell you several things about the selection (count of pixels (all or within specified range), etc...).