maintain a sync counter.