Rotational excitation of molecules by electron collisions