Forward cosmological inference. Simulation based modelling of X-ray cluster samples