code: function getNextPointerSequenceNumber () {
          if (pointerCounter === 0) {
              var storedSequenceNumber = storage.getItem(POINTER_SEQUENCE_STORAGE_KEY);
              pointerCounter = typeof(storedSequenceNumber) === "number" ? storedSequenceNumber : 0;
          }
          var returnValue = pointerCounter++;
          storage.setItem(POINTER_SEQUENCE_STORAGE_KEY, pointerCounter);
          return returnValue;
      }
docs: Get the next pointer sequence number (restoring from storage if it's present)