A self-contained gas powered endoscopic surgical apparatus so is provided for placing lateral lines of surgical fasteners into body tissue. The apparatus includes an anvil member 56 and a surgical fastener cartridge member 58 mounted to the distal end of an elongated endoscopic portion. A tubular collar 220 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 68 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 means 176 for preventing firing of the instrument after it has been fired a predetermined number of times.; A counter 400, 406, 450 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 408, 410 is shown which prevents approximation of the jaws when the jaws are either misaligned or improperly inserted into the instrument. The instrument also includes means 480 for disabling the actuation system after a cartridge has been fired and means 490 for identifying a cartridge member having firing characteristics compatible with the pneumatic actuation system.