I feel bad arguing over this, as this is of relatively little importance, but on your statement that med school is 8 years after undergrad...
the "med school" part only takes 4 years. After that, you are out of med school - no more schooling besides Continuing Medical Education (CME) credits.
The statement that residencies are generally 4 years is a gross generalization. It depends entirely upon your area of specialization. I am going into family medicine, which has a 3 year residency. Many areas of surgical specialty take 6 years. It varies. Most doctors have residencies that last 3 years.
Again, I feel bad about arguing over something so unimportant in the grand scheme.

I don't mean to seem like a bully or anything.
Have a great day!