save states reset count each time