Optimal configuration of a superconducting photon number resolving detector