Predicting emission line fluxes and number counts of distant galaxies for cosmological surveys