Its counted. Any time you spent in L-1A or L=1B and H-1B is cumulative and no clock reset unless you stay and remain outside the US for 1 year. L-2 and H-4 status is not counted towards the maximum time in H-1B (6 years) and L-1A (7 years) .
In order for you to effectively "reset" the max out clock, you will need to REMAIN OUTSIDE THE U.S. for an entire year (12 months) and than come back.
Hiding behind an other visa category as a dependent will simply not do the trick.
Behar Intl. Counsel 619.234.5962 Kindly be advised that the answer above is only general in nature cannot be construed as legal advice, given that not enough facts are known. It is your responsibility to retain a lawyer to analyze the facts specific to your particular situation in order to give you specific advice. Specific answers will require cognizance of all pertinent facts about your case. Any answers offered on Avvo are of a general nature only, and are not meant to create an attorney-client relationship.