train a detection model (like YOLO or SSD) on dark vs light grains
this would already do the counting for you in the inference.
drawback: a lot of manual annotations (ground truth boxes/classid for each grain in the pic) nessecary (you probably need some friends to help with the work)
train a classification model on percentages (<10, 10, 20, 30, 40, …) in the whole image
in any way, you will need a LOT of images, so start collecting now.
also look out for pretrained networks for similar cases, you might be able to re-train it on your problem (with significantly less data than originally)
Thank you for reply :)), I am collecting images and will train YOLO algorithm, if my algorithm detects all thus dark grains, how i can get their % weight from total weight ? total weight is known