title: Reset a CSS counter with class
body: <p>I have a problem when i want to reset a CSS counter with a class. I have understand that it's a scope problem, but when i try to change my code to do it works... it doesn't. I always initiate a new counter when i try to reset.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    counter-reset: num ;
  }
  .number {
    counter-increment: num;
  }
  .number::before {
    content: counters(num, ' - ');
  }
  .reset {
    counter-reset: num ;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="number"&gt;-&lt;/div&gt;
  &lt;div class="number"&gt;-&lt;/div&gt;
  &lt;div class="number"&gt;-&lt;/div&gt;
  &lt;div class="number reset"&gt; Reset&lt;/div&gt;
  &lt;div class="number"&gt;-&lt;/div&gt;
  &lt;div class="number"&gt;-&lt;/div&gt;
  &lt;div class="number"&gt;-&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Can anybody help ? thanks</p>