Never realy got into the electrics on the XM but this might help.
On the early XM's there was one hell of a lot of electrical gremlins, the cure for most of these was to sort out the earth wires. The earths can be found on a multi plug on the inner wing right up next to the back of the headlights, (both sides) The modification on these early cars was to disconnect the multi plug from thr earth point, then remove the body side of the multi plug, this is held on with a M6 nut (10mm socket) Bin the multi plug and this will leave you with a M6 stud poking out of the inner wing. Next cut off the wire end and put normal ring connectors on all of the wires, then you can place the rings over the stud and wind on a 6mm nut, of course not forgetting to clean it all. This will give you a much more secure earthing.
I dont know if this will cure all of the problems, but it was a Citroen reccomended mod on the early cars. My guess as to the rev counter would be a duff sensor, this should be around the flywheel area, if I remember right!
The XM was allways a very much underated car, bad news if you bought a new one but buying used you allways got one hell of a lot of car for not a lot of cash.
Regards. Slim.