The total length of your H is 6 years, no matter how many companies you work for. If there are four years now, you still have tow more years. make sure to apply your I-140 before your H-1 expires.