public void increment() {
    counter = (counter + 1) % storeCompactionPolicySwitchCounterDays;
  }
Increment the counter value each compaction cycle and mod storeCompactionPolicySwitchPeriodDays.
ambry-store/src/main/java/com/github/ambry/store/CompactionPolicyCounter.java