  Many present day quantum optics experiments, particularly in optical quantum
information processing, rely on number-resolving photo-detection as a basic
building block. In this paper we demonstrate that a simple classical
optimisation technique can sometimes be employed to post-process the detector
signature and improve the confidence of the measurement outcome in the presence
of photon-number errors such as loss or dark-counts. While the regime in which
this technique is applicable is rather restrictive, and will likely not be very
useful for the large-scale quantum information processing applications of the
future, the ideas presented might be employed in some present-day experiments
where photo-detectors are typically very poor.
