1. A method comprising: accessing a label stack of a received packet, the label stack including a plurality of multiprotocol label switching (MPLS) labels; reading from an incoming label mapping (ILM) table stored in a first memory an entry associated with a top MPLS label in the label stack and a number of other entries; storing the number of other entries read from the ILM table in a second memory.