An Automatic Point-Counting Method for Mineralogical Assessment