  We propose a design for a photon counting detector capable of resolving
multiphoton events. The basic element of the setup is a fiber loop, which traps
the input field with the help of a fast electrooptic switch. A single weakly
coupled avalanche photodiode is used to detect small portions of the signal
field extracted from the loop. We analyze the response of the loop detector to
an arbitrary input field, and discuss both the reconstruction of the photon
number distribution of an unknown field from the count statistics measured in
the setup, and the application of the detector in conditional state
preparation.
