You can run erasure/diagnostics for the same device several times on the same computer and you would only consume one erasure/diagnostics license.

If you process the device on another computer, restart or log out, then that computer cannot know if the same device has been processed already, so a new license will be consumed.