Experimental multi-photon-resolving detector using a single avalanche photodiode