Fix counting of packets