After some tryout from the "usage" docs I still can not figure it out how to count the amount of white existing in a grayscale image....
I have tryed several variations ( including -fuzz, -unique-colors, -opaque , etc) with no sucess

my original idea is to send a percentage value to a variable inside a script ( Windows ) something like :
set a = convert yyyy.jpg -colorspace gray -unique-colors -print "%fx[:white/(w*h)]" null:
No matter what "convert" arguments I try I simply get the value "1" ...
According to the docs I should be careful with the black color ...
Any ideas ?