The design of a digital single-molecule detection platform, with direct application to single cell analysis