This Casual Photophile article '
Which Leica SLR should I buy?' suggests getting the R5 over the R4 on the grounds that it's very similar but with a greater shutter speed range and it has many of the R4’s electronic faults sorted and fixed. For the R4 it advises to avoid serial numbers below 1,600,000.
All R mount lenses should fit the R4 and R5 but the earlier ones (1 cam and 2 cam) will only allow stop down metering - this Wikipedia article '
Leica R bayonet' has a handy compatability guide of the 5 mount types across the Leica SLRs.
The main drawback to the Leica SLRs that I've heard mentioned often is that whilst the bodies can be had for reasonable prices the lenses are a different matter.