title: Page counter is always Page 1 of 0 but I have 3 pages
body: <p>Here's my code:</p>
  <pre><code>&lt;div id=&quot;pageNumber&quot;&gt;&lt;/div&gt;
  
      #pageNumber {
          position: fixed;
          bottom: 0;
          right: 0;
          font-size: small;
      }
      
      
      
      
      @media print {  
          @page 
          { 
              counter-increment: page;
              size: auto;
              margin: 25mm 25mm 25mm 25mm;
          } 
          
          #pageNumber::after {
              counter-increment: page;
              content: &quot;Page &quot; counter(page) &quot; of &quot; counter(pages);
          }
  
      
      }
  </code></pre>
  <p>It always returns Page 1 of 0.
  I'm trying to make it Page 1 of 3 Page 2 of 3 and so on. What could be wrong?</p>