Recently, the maximum a posteriori (MAP) probability rule has been proposed as an objective and quantitative method to detect atom columns and even single atoms from high-resolution high-angle annular dark-field (HAADF) scanning transmission electron microscopy (STEM) images. The method combines statistical parameter estimation and model-order selection using a Bayesian framework and has been shown to be especially useful for the analysis of the structure of beam-sensitive nanomaterials. In order to avoid beam damage, images of such materials are usually acquired using a limited incoming electron dose resulting in a low contrast-to-noise ratio (CNR) which makes visual inspection unreliable. This creates a need for an objective and quantitative approach. The present paper describes the methodology of the MAP probability rule, gives its step-by-step derivation and discusses its algorithmic implementation for atom column detection. In addition, simulation results are presented showing that the performance of the MAP probability rule to detect the correct number of atomic columns from HAADF STEM images is superior to that of other model-order selection criteria, including the Akaike Information Criterion (AIC) and the Bayesian Information Criterion (BIC). Moreover, the MAP probability rule is used as a tool to evaluate the relation between STEM image quality measures and atom detectability resulting in the introduction of the so-called integrated CNR (ICNR) as a new image quality measure that better correlates with atom detectability than conventional measures such as signal-to-noise ratio (SNR) and CNR.