title: Find total number of $count++ in while loop
body: <p>I have a basic counter going that echoes out the number for each paragraph in my content, and I need to find the total number of loops for my counter...</p>
  
  <pre><code>&lt;?php
      $count = 0;
      // check if the repeater field has rows of data
      if( have_rows('each_class_event') ):
      // loop through the rows of data
      while ( have_rows('each_class_event') ) : the_row(); ?&gt;
          &lt;?php $count++; ?&gt;
  
      &lt;div class="eachOne"&gt;
         &lt;div class="classInfo"&gt;
              &lt;p&gt;Session &lt;?php echo $count; ?&gt;&lt;/p&gt;
          &lt;/div&gt;
       &lt;/div&gt;
  </code></pre>
  
  <p>in the paragraph I need it to be something like:</p>
  
  <pre><code>    &lt;p&gt;Session &lt;?php echo $count; ?&gt; of &lt;?php echo $totalCount; ?&gt;&lt;/p&gt;
  </code></pre>