  Likelihood-free inference provides a rigorous approach to preform Bayesian
analysis using forward simulations only. The main advantage of likelihood-free
methods is its ability to account for complex physical processes and
observational effects in forward simulations. Here we explore the potential of
likelihood-free forward modeling for Bayesian cosmological inference using the
redshift evolution of the cluster abundance combined with weak-lensing mass
calibration. We use two complementary likelihood-free methods, namely
Approximate Bayesian Computation (ABC) and Density-Estimation Likelihood-Free
Inference (DELFI), to develop an analysis procedure for inference of the
cosmological parameters $(\Omega_\mathrm{m},\sigma_8)$ and the mass scale of
the survey sample. Adopting an eROSITA-like selection function and a 10-percent
scatter in the observable-mass relation in a flat $\Lambda$CDM cosmology with
$\Omega_\mathrm{m}=0.286$ and $\sigma_8=0.82$, we create a synthetic catalog of
observable-selected NFW clusters in a survey area of 50 deg$^2$. The stacked
tangential shear profile and the number counts in redshift bins are used as
summary statistics for both methods. By performing a series of forward
simulations, we obtain convergent solutions for the posterior distribution from
both methods. We find that ABC recovers broader posteriors than DELFI,
especially for the $\Omega_\mathrm{m}$ parameter. For a weak-lensing survey
with a source density of $n_\mathrm{g}=20$ arcmin$^{-2}$, we obtain posterior
constraints on $S_8=\sigma_8(\Omega_\mathrm{m}/0.3)^{0.3}$ of $0.836 \pm 0.032$
and $0.810 \pm 0.019$ from ABC and DELFI, respectively. The analysis framework
developed in this study will be particularly powerful for cosmological
inference with ongoing cluster cosmology programs, such as the XMM-XXL survey
and the eROSITA all-sky survey, in combination with wide-field weak-lensing
surveys.
