The time starts when you first were admitted to the U.S. in L-1B status. Your employer must submit a new L-1B petition, document the time that you were outside the U.S., and request that this time be "recaptured" and that your L-1B status be extended by this amount of time.
It is only the time that you are physically in the United States that counts against your 5-year cap. Your employer must file an extension petition prior to your current expiration and can apply for an extension up to two years in length. If this includes time outside of the U.S. that you are attempting to recapture, you will have to provide documentary evidence such as copies of passport exit/entry stamps.