How can I persist my stats between contract updates?

I’m trying to persist the stats when I modify my contract


pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
contract TipMe is Ownable {
     address payable constant commissionAddress_ = payable(0xAd4B1774f0C051AaEce4402370f1b340809fF64B); // Address of the commission receiver
     uint256 constant minTip_ = 25; // Minimum tip of 0.25%
     uint256 feesCharged_ = 0;
     uint256 released_ = 0;
     uint256 transactionCount_ = 0;
     function deposit(address payable _receiver, uint256 _requestedCommissionFee) public payable {
        require(_requestedCommissionFee >= minTip_,"You must tip the creator at least 0.25%");
        uint256 _commissionFee = msg.value * _requestedCommissionFee / 1000;
        uint256 _remaining = msg.value - _commissionFee;
        feesCharged_ = feesCharged_ + _commissionFee;
        released_ = released_ + _remaining;
        _receiver.transfer(_remaining);
        commissionAddress_.transfer(_commissionFee);
				transactionCount_ += 1;
     }
     function getTransactionCount() public view returns(uint256) {
        return transactionCount_;
     }
		 function getFees() public view returns(uint256) {
        return feesCharged_;
     }
     function getReleased() public view returns(uint256) {
        return released_;
     }
     function getTotalValueProcessed() public view returns(uint256) {
        return released_ + feesCharged_;
     }
}

Do you want to persist storage like feesCharged while updating functions like deposit() ?

Yeah. The number of transactions and the two running totals of fees and amounts. I don’t want those to reset to zero when I re-deploy

You can add two setters in the new contract and set the values for those variables. This relies on the trust of the executor. An approach relying less on external trust is to read directly from the smart contract in the new contract through an interface.

"Unstructured Upgradable Storage Proxy Contracts" can meet your requirement. keep the state in proxy contract, and move the calculation function in an implementation contract.
Google the "Unstructured Upgradable Storage Proxy Contracts", you will find many HOWTO.