Binary genetic switches are widely used in synthetic biology for switching between two expression states, ON and OFF. In particular, single input switches, which alternate between ON and OFF in response to the same input signals, are the key elements of counting devices which count the occurrence of a repeated intracellular or extracellular signal. Most existing DNA switches require two inputs, and no single-input switch capable of robust switching between two states has been developed so far. Here we use mathematical modelling to design such a switch by combining two double-input DNA switches: a transcriptional toggle switch (TTS) and a DNA inversion switch. The TTS switches between expression of two transcriptional repressors, mutually inhibiting each other. The DNA inversion switch is based on recombination by a serine integrase, inverting a DNA segment located between two attachment sites. Integrase reverses its directionality in the presence of a recombination directionality factor (RDF); therefore the alternate induction of integrase with or without RDF results in flipping of the DNA segment. In the design of our one-input switch the TTS ensures bistability, while the DNA inversion switch provides a single-input control by flipping the DNA segment with an inducible promoter. The model predicts that the combined bistability of the TTS and unidirectionality of DNA recombination ensure nearly 100% efficiency of switching between ON and OFF states in response to repeated pulses of inducer. The switch is predicted to be robust to parameter perturbations and molecular noise, making it a promising candidate for further use as a basic element of counting devices.