  The counting statistics give insight into the properties of quantum states of
light and other quantum states of matter such as ultracold atoms or electrons.
The theoretical description of photon counting was derived in the 1960s and was
extended to massive particles more recently. Typically, the interaction between
each particle and the detector is assumed to be limited to short time
intervals, and the probability of counting particles in one interval is
independent of the measurements in previous intervals. There has been some
effort to describe particle counting as a continuous measurement, where the
detector and the field to be counted interact continuously. However, no general
formula applicable to any time and space dependent field has been derived so
far. In our work, we derive a fully time and space dependent description of the
counting process for linear quantum many-body systems, taking into account the
back-action of the detector on the field. We apply our formalism to an
expanding Bose-Einstein condensate of ultracold atoms, and show that it
describes the process correctly, whereas the standard approach gives unphysical
results in some limits. The example illustrates that in certain situations, the
back-action of the detector cannot be neglected and has to be included in the
description.
