Sample partitioning is the key to digital PCR. Template molecules are distributed randomly among partitions, such that some partitions have no template molecules and others have one or more. Each partition undergoes PCR amplification and analysis separately, and the partitions with and without amplified product are individually counted.