Does 6 year include I140 based extension too

I'm in need of your advice on my situation,
I entered US in Mar'07 on an H1B visa with employer A, switched to employer B and exited US Feb'10.

Again entered US Apr'11 (still with employer B) and switched to employer C and was visiting other countries outside US from Jun'12 (same employer C)

Again entered US Feb'13. My perm was started by employer C and i got my I-140 approved v( with priority date of Aug’12) . Then i switched to employer D and I am still in the US. My current H1B was extended by employer D, based on approved I-140 from my previous employer C and my current H1B is valid only till 08/11/2016.

Now, how much time do i have for starting my perm with current employer D (so as to be able to get future extensions). How much of my outside US stay period can be recaptured to allow my additional time before starting my perm.

I'm getting a very good offer from a top notch company and thinking of switching to it and start my perm with them.

Best Regards
Yes, you may transfer your H1B using the I-140 approval from your previous employer. However, please ensure that the new Employer initiates a PERM and ports the I-140 upon PERM approval to continue your Green Card Process.

Also an H1B holder may apply for an H1B extension and “recapture” days spent outside of the US.

If the H1B visa holder was outside the US in the 6 years they held H1B status, they can recapture those days in an H1B extension application.

The H1B holder would submit the exit from US and entry back to US dates, as well as the corresponding stamps and I-94 copies from his/her passport.