  We present a quantum electrical circuit with Josephson junctions formed of
two anharmonic oscillators coupled with an interaction
$g\gamma_{1}^{2}\gamma_{2}^{2}$ where $\gamma_{1}$ and $\gamma_{2}$ are
position-like coordinates. This type of coupling allows the quantum
non-demolition measurement of the energy of one oscillator by monitoring the
frequency of the second oscillator. Despite the fundamental tradeoff between
the coupling strength $g$ and maximum photon storage capacity of the
oscillators, it is possible to achieve high fidelity detection of up to 10
photons over time scale of the order of microseconds. We discuss the
possibility of observing quantum jumps in the number of photons and related
applications.
