title: Rails: will_paginate run extra SQL query when calling page_entries_info
body: <p>My application using rails '3.2.20', mysql2 '0.3.20' and will_paginate '3.0.7'</p>
  
  <p>I'm trying to load user records</p>
  
  <pre><code>@users = User.paginate(:page =&gt; params[:page], :per_page =&gt; 20)
  </code></pre>
  
  <p>Below queries executed in console</p>
  
  <pre><code>User Load (0.3ms)  SELECT `users`.* FROM `users` LIMIT 20 OFFSET 0
  (0.3ms)  SELECT COUNT(*) FROM `users` 
  </code></pre>
  
  <p>Generally will_paginate run two queries for collections and count</p>
  
  <p>But I got one more extra query when used page_entries_info in view</p>
  
  <pre><code>User Load (0.3ms)  SELECT `users`.* FROM `users` LIMIT 20 OFFSET 0
  (0.3ms)  SELECT COUNT(*) FROM `users` 
  User Load (0.2ms)  SELECT `users`.* FROM `users` LIMIT 1 OFFSET 0
  </code></pre>
  
  <p>hope last query is not used anywhere.</p>
  
  <p>I just illustrate with simple example, but my application executes large query with more joins and includes.</p>
  
  <p>It may slow down the performance with unnecessary query.</p>
  
  <p>This occurs only after will_paginate '3.0.3'</p>
  
  <p>is it bug/functionality? how to avoid this extra query?</p>