[en] We investigate an ensemble of atoms which can be excited into a Rydberg state. Using a disordered quantum Ising model, we perform a numerical simulation of the experimental procedure and calculate the probability distribution function $P(M)$ to create a certain number of Rydberg atoms $M$, as well as their pair-correlation function. Using the latter, we identify the critical interaction strength above which the system undergoes a phase transition to a Rydberg crystal. We then show that this phase transition can be detected using $P(M)$ alone.