Electron number density measurements from the frequency shift of a plasma defect state in a one-dimensional photonic crystal