  We study the redshift distribution of two samples of early-type gravitational
lenses, extracted from a larger collection of 122 systems, to constrain the
cosmological constant in the LCDM model and the parameters of a set of
alternative dark energy models (XCDM, Dvali-Gabadadze-Porrati and Ricci dark
energy models), under a spatially flat universe. The likelihood is maximized
for $\Omega_\Lambda= 0.70 \pm 0.09$ when considering the sample excluding the
SLACS systems (known to be biased towards large image-separation lenses) and
no-evolution, and $\Omega_\Lambda= 0.81\pm 0.05$ when limiting to gravitational
lenses with image separation larger than 2" and no-evolution. In both cases,
results accounting for galaxy evolution are consistent within 1$\sigma$. The
present test supports the accelerated expansion, by excluding the
null-hypothesis (i.e., $\Omega_\Lambda = 0 $) at more than 4$\sigma$,
regardless of the chosen sample and assumptions on the galaxy evolution. A
comparison between competitive world models is performed by means of the
Bayesian information criterion. This shows that the simplest cosmological
constant model - that has only one free parameter - is still preferred by the
available data on the redshift distribution of gravitational lenses. We perform
an analysis of the possible systematic effects, finding that the systematic
errors due to sample incompleteness, galaxy evolution and model uncertainties
approximately equal the statistical errors, with present-day data. We find that
the largest sources of systemic errors are the dynamical normalization and the
high-velocity cut-off factor, followed by the faint-end slope of the velocity
dispersion function.
