Store change count for redo/undo.