. . . .Let me answer three ways.
1) It does not matter. Get the least expensive working camera you can and start shooting.
2) M6. M5's are great but too old; M7's are great but too electronic. Electronics are, in my experience, the Achilles' heel of Leicas. My M5 needed a new metering/battery connection, my M6 needed its entire metering circuit board replaced after about 10 years of being ridden pretty hard, my M7 arrived with its "cassette reading" ISO pins, not functioning, My R4 needed its magnets and switches (shutter controls) replaced. Nothing purely mechanical has ever spontaneously gone wrong with my Leicas -- not even rangefinder misalignment and I have been using them since 1991. So: M6. Old, but not too old, and at the current sweet spot in terms of dollars vs. life-left-per-unit and parts availability etc. Also, M6 works fine without batteries.
3) You haven't said how you like to shoot or what lenses/focal lengths are your favorites. If 21 or wider, the M5 is out, as deeply recessed lens elements interfere with the metering arm. Ditto all collapsible lenses (when collapsed). If 90mm or longer (or 50/f:1 or faster), only the M6 TTL comes in a variant with an 0.85 finder. If you shoot a lot of contra-jour (into the sun or other light source), the finder in the M5 has superior flare resistance. If you need a spot meter, the M5 is the closest. If you need AE, then the M7 is the only choice. Very large hands: M5 (maybe) but try to hold one and see. I have medium sized hands and all three were/are very comfortable to shoot. Fit and finish is arguably highest on the M5 (last of the hand fitted Leicas), but I never noticed the difference, along with nifty M5 plusses like a ratcheted rewind crank. Need a Rapidwinder or Autowinder? M6 or M7, but no M5.
Finally, I have owned all three. I sold the M7 a year after getting it. Not because it wasn't great, once the auto-ISO feature was fixed, but because it was the most valuable camera I had and I needed to raise money for an M8. The accuracy of the M7 shutter was great in concept, but made no difference in my results (and when you get right down to it most film doesn't meaningfully register exposure discrepancies of less than 1/3 stop except in the most technical applications). Next to go was an M6 TTL. Wonderful camera, but once again in its condition it was the best way to raise money (spent on a puppy, not on camera gear). Also, when I use a flash, I use a handheld meter, so the TTL feature was wasted on me. Still left in the stable: M6 Classic, M5, M3 (2x), M2, CL (2x).
Which brings me back to point number 1. The little secret about Leicas is this: it's the lenses, stupid (I say this to myself only). I don't really think that the camera doesn't matter. But in the end? It's the lenses. And they will go on anything with an M-mount.