Data-driven determination of number of discrete conformations in single-particle cryo-EM