This machine transports the material particles to the electronic counting machine through a lifting feeder or manually. The medicines enter the medicine warehouse in an orderly manner through the vibration of the feeding corrugated plate, and a photoelectric sensor for counting grains is installed on the medicine warehouse. The medicines in the medicine warehouse are quantitatively counted through photoelectric particle counting sensors, and then accurately packed into bags prepared by the bagging machine.