Count number of TCP/UDP packets