How not to lose the value of a counter in javascript?

I made a simple counter in the card template. I would like for each card answered, this counter is increased by 1.
But it is reset on the new card. Is it possible to save this value between the cards transition?

I wouldn’t want to have to create an add-on. A javascript would help me.

Thanks. See the result.