J/psi and psi(2S) production in pp collisions at sqrt(s) = 7 TeV.