Electron Density Diagnostics for the Solar Upper Atmosphere from Spectra Obtained by SUMER/SOHO