Fecundity, fertility and the formation of human capital