Whistler measurements of electron density in the magnetosphere