EmonESP (Wemos) Pulse counting

I’ve successfully flashed EmonESP to a Wemos D1 Mini and wondering if by simply adding a photo-resistor (somehow) I can count energy meter pulses and feed them back to EmonCMS?