We use N-body simulations to show that high-redshift galaxy counts provide an interesting constraint on the nature of darkmatter, specificallywarm darkmatter (WDM), owing to the lack of early structure formation these models. Our simulations include three WDM models with thermal-production masses of 0.8, 1.3 and 2.6 keV, as well as CDM. Assuming a relationship between dark halo mass and galaxy luminosity that is set by the observed luminosity function at bright magnitudes, we find that 0.8 keV WDM is disfavoured by direct galaxy counts in the Hubble Ultra Deep Field at >10σ. Similarly, 1.3 keV WDM is statistically inconsistent at 2.2σ. Future observations with JWST (and possibly HST via the Frontier Fields) could rule out 1.3 keV WDMat high significance, and may be sensitive to WDM masses greater than 2.6 keV. We also examine the ability of galaxies in these WDM models to reionize the universe, and find that 0.8 and 1.3 keV WDM produce optical depths to the cosmic microwave background (CMB) that are inconsistent at 68 per cent C.L. with current Planck results, even with extremely high ionizing radiation escape fractions, and 2.6 keV WDM requires an optimistic escape fraction to yield an optical depth consistent with Planck data. Although CMB optical depth calculations are model dependent, we find a strong challenge for stellar processes alone to reionize the universe in a 0.8 and 1.3 keV WDM cosmology. © 2014 The Authors. Published by Oxford University Press on behalf of the Royal Astronomical Society.