  A Bayesian statistical formalism is developed to quantify the level at which
the mass function slope (alpha) and the projected cumulative mass fraction (f)
of (CDM) substructure in strong gravitational-lens galaxies, with arcs or
Einstein rings, can be recovered as function of the lens-survey parameters and
the detection threshold of the substructure mass. The method is applied to
different sets of mock data to explore a range of observational limits: (i) the
number of lens galaxies in the survey, (ii) the mass threshold, Mlow, for the
detection of substructures and (iii) the uncertainty of the measured
substructure masses. We explore two different priors on the mass function
slope: a uniform prior and a Gaussian prior with alpha = 1.90+-0.1. With a
substructure detection threshold Mlow=3x10^8 Msun, the number of lenses
available now (n_l=30), a true dark-matter mass fraction in (CDM) substructure
<=1.0% and a prior of alpha = 1.90+-0.1, we find that the upper limit of f can
be constrained down to a level <=1.0% (95% CL). In the case of a Gaussian prior
on alpha, it is always possible to set stringent constraints on both
parameters. We also find that lowering the detection threshold has the largest
impact on the ability to recover alpha, because of the (expected) steep
mass-function slope. In the future, thanks to new surveys with telescopes, such
as SKA, LSST and JDEM and follow-up telescopes with high-fidelity data, a
significant increase in the number of known lenses will allow us to recover the
satellite population in its completeness. For example, a sample of 200 lenses,
equivalent in data-quality to the Sloan Lens ACS Survey and a detection
threshold of 10^8 Msun, allows one to determine f=0.5+-0.1% (68% CL) and
alpha=1.90+-0.2 (68% CL).
