Getting difference in calculating pulses from energy meter

There’s not enough real information there about your system and what you’re trying to do for anyone to provide any real help. See the FAQ page:

The short answer to interference problems, if indeed that is what you have, is to trace the source, or more likely sources, of the interference and eliminate it at source. That is usually much more effective, though often harder, than trying to keep it out or ameliorate its effects.