Extend H1B after 6 years if PERM not approved

My current situation is: My H1B expires in September 2019. My PERM will only be applied in November 2019. I have applied for H4 on my wife’s H1B with which I will be able to stay in the country and work. My question is when my PERM let’s say gets approved next year in Nov, will I be able to get an extension on my H1B or will I still have to be outside the country for an year?

Have you exhausted all 6 years ?