There are two ways that come to mind that this can be done.

Method 1
1) Create a separate, hidden counter.
2) Whenever damage is passed over, add that amount to the hidden counter instead of...