As pH is fundamental to all biological processes, pH-responsive bacterial genetic circuits enable precise sensing in any environment. Where unintentional release of engineered bacteria poses a concern, coupling pH sensing to expression of a toxin creates an effective bacterial containment system. Here, we present a pH-sensitive kill switch (acidic Termination of Replicating Population; acidTRP), based on the E. coli asr promoter, with a survival ratio of less than 1 in 10 6 . We integrate acidTRP with cryodeath to produce a two-factor containment system with a combined survival ratio of less than 1 in 10 11 whilst maintaining evolutionary stability. We further develop a pulse-counting circuit with single cell readout for each administered stimulus pulse. We use this pulse-counter to record multiple pH changes and combine it with acidTRP to make a two-count acid-sensitive kill switch. These results demonstrate the ability to build complex genetic systems for biological containment.