Using the CSS 'counter-reset' property.