Context. Existing samples of strong lenses have been assembled by giving priority to sample size, but this is often at the cost of a complex selection function. However, with the advent of the next generation of wide-field photometric surveys, it might become possible to identify subsets of the lens population with well-defined selection criteria, trading sample size for completeness. Aims: There are two main advantages of working with a complete sample of lenses. First, such completeness makes possible to recover the properties of the general population of galaxies, of which strong lenses are a biased subset. Second, the relative number of lenses and non-detections can be used to further constrain models of galaxy structure. The present work illustrates how to carry out a statistical strong lensing analysis that takes advantage of these features. Methods: I introduce a general formalism for the statistical analysis of a sample of strong lenses with known selection function, and then test it on simulated data. The simulation consists of a population of 105 galaxies with an axisymmetric power-law density profile, a population of background point sources, and a subset of ∼103 strong lenses, which form a complete sample above an observational cut. Results: The method allows the user to recover the distribution of the galaxy population in Einstein radius and mass density slope in an unbiased way. The number of non-lenses helps to constrain the model when magnification data are not available. Conclusions: Complete samples of lenses are a powerful asset with which to turn precise strong lensing measurements into accurate statements on the properties of the general galaxy population.