A network switch for switching packets from a source to a destination includes
a source port for receiving an incoming packet from a source, a destination port
that contains a path to a destination for the packet, and a programmable counter
unit for counting a number of packets of selected packet types which are received
by the switch.