adding packet counter