You will not be counted into the quota if your first H1-B has been counted as long as you have not left the U.S. for more than one year after you obtained your first H1-B. That means you can apply a new H1-B at any time without being limited by the financial year cap. However, you have to apply a new H1-B instead of transferring because your current status is no longer H1-B. You cannot work until your new H1-B is approved. Both your H1 period and your H4 period will be counted into the 6 years h1 validate time. Good luck.