There's really no such thing as a "transfer" of the visa. The new employer starts over. However, certain issues, specifically the cap limits, won't apply the second time around.
You're confused about the six years. The six years is the limit on the continuous time you can spend in the US on the H1B visa. You can't renew it at six years (you must leave, barring certain exemptions). Renewal is only available at the end of the first three year visa term for the second three years. However, since you spent time outside the US, the six years stops accumulating while you're gone.

