Measurement of open charm production in two-photon processes with detection of electron-inclusive events