We study the effect of baryonic processes on the halo mass function in the galaxy cluster mass range using a catalogue of 153 high-resolution cosmological hydrodynamical simulations performed with the AMR code RAMSES. We use the results of our simulations within a simple analytical model to gauge the effects of baryon physics on the halo mass function. Neglect of AGN feedback leads to a significant boost in the cluster mass function similar to that reported by other authors. However, including AGN feedback not only gives rise to systems that are similar to observed galaxy clusters, but they also reverse the global baryonic effects on the clusters. The resulting mass function is closer to the unmodified dark matter halo mass function but still contains a mass dependent bias at the 5-10 per cent level. These effects bias measurements of the cosmological parameters, such as σ8 and Ωm. For current cluster surveys baryonic effects are within the noise for current survey volumes, but forthcoming and planned large SZ, X-ray and multiwavelength surveys will be biased at the per cent level by these processes. The predictions for the halo mass function including baryonic effects need to be carefully studied with larger and improved simulations. However, simulations of full cosmological boxes with the resolution we achieve and including AGN feedback are still computationally challenging.