title: cakephp pagination with count issue
body: <p>I have written below code in my <code>controller</code> action.</p>
  
  <pre><code>$this-&gt;paginate['Tag'] = array(
              'fields' =&gt; array('COUNT(tag_id) AS numbers', 'tag', 'slug'),
              'limit' =&gt; 50,
              'order' =&gt; 'numbers desc',
              'recursive' =&gt; 2,
              'group' =&gt; array('tag'),
          );
  $tags = $this-&gt;paginate('Tag', array('not' =&gt; array('site_id' =&gt; NULL), 'tag !=' =&gt; ''));
  </code></pre>
  
  <p>And written below code in the <code>.ctp</code> file.</p>
  
  <pre><code>&lt;div class="row section"&gt;
      &lt;div class="col col_16 pagination"&gt;
          &lt;h3&gt;Tags&lt;/h3&gt;
          &lt;?php
          foreach ($tags as $key =&gt; $tag) {
              echo '&lt;span&gt;' . $this-&gt;Html-&gt;link($tag['Tag']['tag'] . ' (' . $tag[0]['numbers'] . ')', '/tags/' . $tag['Tag']['slug']) . '&lt;/span&gt;';
          }
          ?&gt;
      &lt;/div&gt;
      &lt;div class="col col_16 pagination"&gt;
          &lt;?php
          echo $this-&gt;Paginator-&gt;first('First', null, null, array('class' =&gt; 'disabled'));
          echo $this-&gt;Paginator-&gt;prev('Previous', null, null, array('class' =&gt; 'disabled'));
          echo $this-&gt;Paginator-&gt;numbers(array('separator' =&gt; ''));
          echo $this-&gt;Paginator-&gt;next('Next', null, null, array('class' =&gt; 'disabled'));
          echo $this-&gt;Paginator-&gt;last('Last', null, null, array('class' =&gt; 'disabled'));
          ?&gt;
      &lt;/div&gt;
      &lt;div class="col col_16 pagination"&gt;
          &lt;h5 class="margin0Px"&gt;
              &lt;?php
              echo $this-&gt;Paginator-&gt;counter(array(
                  'format' =&gt; __('Page %page% of %pages%, showing %current% out of %count% total, starting on %start%, ending on %end%.', true)
              ));
              ?&gt;
          &lt;/h5&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Getting false result in view <code>$this-&gt;Paginator</code>.</p>
  
  <p>What is the issue here? I am not getting any idea. Pls help.</p>