A self contained gas powered endoscopic surgical apparatus is provided for placing lateral lines of surgical fasteners into body tissue. The apparatus includes an anvil member and a surgical fastener cartridge member mounted to the distal end of an elongated endoscopic portion. A tubular collar of the endoscopic portion moves distally to engage the anvil member and bias the anvil member and the cartridge member into cooperative alignment thereby clamping body tissue to be fastened between the anvil member and the cartridge member. A self contained pneumatic system is optionally disposed in the surgical apparatus and is actuable to eject and/or form the surgical fasteners in the clamped body tissue. The apparatus further comprises a locking mechanism for preventing firing of the instrument after it has been fired a predetermined number of times. A counter for displaying the number of times the apparatus has been fired may be provided. A firing interlock is also shown which prevents accidental actuation of the firing trigger. A clamping interlock is shown which prevents approximation of the jaws when the jaws are either misaligned or improperly inserted into the instrument. The instrument also includes structure for disabling the actuation system after a cartridge has been fired and structure for identifying a cartridge member having firing characteristics compatible with the pneumatic actuation system.