Count times wattage is above certain number

Hello,

I’ve installed a sump pump it works fully automatically but i would like to know how often it runs. Ive installed it behind a shelly 1PM switch which can monitor its usage. when it runs it uses 350watts. How to i make a sensor which adds 1 for every time the pump uses more than 300w.

Thanks!