Homogeneous polynomials in many variables and rational points on varieties