Welcome to the OEM forum, Matthieu.
Do you want the time to go into emonCMS (or similar?) I think it might be easier to count revolutions of the feed screw, because that will give you a direct measurement of the quantity - always assuming the pellets don’t run out.
You can do that either with a commercial proximity detector, with a magnet on the shaft going past a reed switch, or with a reflective optical sensor. Without knowing exactly what the feeder looks like, it’s hard to say which would be the best. Optical might not be a good idea if the pellets create a lot of dust, and a reed switch might have problems with vibration.
If the feeder is “industrial”, then my inclination would be to use a proper industrial inductive proximity sensor to detect a metal flag on the shaft - or maybe bolt heads on a coupling? Power might present a problem, because those are likely to require 12 V or 24 V d.c. They are not cheap, but reliable.