In this paper we propose an estimator for models in which an endogenous dichotomous treatment affects a count outcome in the presence of either sample selection or endogenous participation using maximum simulated likelihood. We allow for the treatment to have an effect on both the sample selection or the participation rule and the main outcome. Applications of this model are frequent in – but are not limited to – health economics. We show an application of the model using data from Kenkel and Terza (2001), who investigate the effect of physician advice on the amount of alcohol consumption. Our estimates suggest that in these data (i) neglecting treatment endogeneity leads to a wrongly signed effect of physician advice on drinking intensity, (ii) neglecting endogenous participation leads to an upward biased estimate of the treatment effect of physician advice on drinking intensity.