We analyse the full counting statistics (FCS) of photons flowing in and out of a microwave cavity coupled to a voltage-biased Josephson junction. Tunnelling of Cooper pairs generates a coherent flow of photons into the cavity whilst at the same time photons can also leak out incoherently. We use a very general unitary transformation method to demonstrate that there is a simple connection between the FCS of the charges and the photons in the long time limit, revealing that all the cumulants of the coherent and the incoherent processes match in that limit. We also explore some of the interesting features in the counting statistics of the charges and photons which arise from the strongly nonlinear dynamics of the system. These include very narrow distributions associated with the emergence of coherent transport and regimes where counting of either an odd or an even number of photons leaving the cavity can result in strongly non-classical cat states within the cavity. where the renormalized Josephson energy is defined as = -D E E e J J 2 0 2 D E E z J z e 4 J J B 1 2 0 1 0 2 0 2[ ( ) ] with z 1 ;1.841), though it rises abruptly at the bifurcation, before slowly dropping away again for even larger E J . In terms of the Figure 2. (a) Distributions for coherent photon transfer into the cavity, P N t ,( ), and incoherent emission from the cavity, P(N, t), at different times. (b) Behaviour of P(N, t) below and above the bifurcation at = E E J J B together with the corresponding Poissonian distributions (dashed); γt=80 (except for = E E 1.6 J J Bwhere γt=60 for clarity). (c) Large deviation functions (for γt=80); the Poissonian case is shown as a dashed line. Δ 0 =0.5 throughout. 7 If instead we use just the part of ρ(0) which is diagonal (in the number state basis) in equation (15) to define our moment generating function, then the counting distribution we obtain remains positive. This is because doing so amounts to defining a generating function for a counting distribution corresponding to two-point projective measurements of the photon number (see section II of [40]).