Detecting an itinerant microwave photon with high efficiency is an outstanding problem in microwave photonics and its applications. We present a scheme to detect an itinerant microwave photon in a transmission line via the nonlinearity provided by a transmon in a driven microwave resonator. With a single transmon we achieve 84% distinguishability between zero and one microwave photons and 90% distinguishability with two cascaded transmons by performing continuous measurements on the output field of the resonator. We also show how the measurement diminishes coherence in the photon number basis thereby illustrating a fundamental principle of quantum measurement: The decoherence rate increases as the detector is made more effective. Conventional photon detectors, such as avalanche photodiode (APD) and photomultiplier tube (PMT), are widely used in practice. However, they destroy the signal photon during detection. There are a number of schemes for quantum nondemolition (QND) optical photon detection [3][4][5], but typically they require a high-Q cavity for storing the signal mode containing the photon(s) to be detected, and a leaky cavity for manipulating and detecting the probe mode. Thus, during one lifetime of a signal photon, the probe mode undergoes many cycles to accumulate information about the signal. This type of detection requires repeated measurements, and the high-Q cavity limits the photodetection bandwidth. In the microwave regime the detection of single photons [6][7][8][9][10][11][12][13][14][15] is more challenging, especially nondestructive detection [6,9,14,15]. Here we propose a scheme for nonabsorbing, high-efficiency detection of single itinerant microwave photons via the nonlinearity provided by an artificial superconducting atom, a transmon [16].Previously [15,17], we considered schemes where the signal photon wave packet propagates freely in an open transmission line [11,18] and encounters the lowest transition of a transmon. The cw-probe field couples the first and second excited states of the transmon and is monitored via continuous homodyne detection. Displacements in the homodyne current, due to the large transmon-induced cross-Kerr nonlinearity [18], indicate the presence of a photon. We showed that, in spite of the exceptionally large cross-Kerr nonlinearity it exhibits [18], a single transmon in an open transmission line is insufficient for reliable microwave photon detection, due to saturation of the transmon response to the probe field [17]. More recently [15], we showed that multiple cascaded transmons could achieve reliable microwave photon counting in principle, though the number of transmons and circulators required in this scheme presents serious experimental challenges.In this paper we propose a scheme that achieves reliable photon counting with as few as a single transmon. The key * stace@physics.uq.edu.au insight is to use a cavity resonant with the probe field to enhance the probe displacements, which depends on the signal photon number. We quantify the measurement efficie...