title: How to get a published collection's total count, regardless of a specified limit, on the client?
body: <p>I'm using the <a href="https://github.com/tmeasday/meteor-paginated-subscription" rel="noreferrer">meteor-paginated-subscription</a> package in my app.  On the server, my publication looks like this:</p>
  
  <pre><code>Meteor.publish("posts", function(limit) {
    return Posts.find({}, {
      limit: limit
    });
  });
  </code></pre>
  
  <p>And on the client:</p>
  
  <pre><code>this.subscriptionHandle = Meteor.subscribeWithPagination("posts", 10);
  
  Template.post_list.events = {
    'click #load_more': function(event, template) {
      template.subscriptionHandle.loadNextPage();
    }
  };
  </code></pre>
  
  <p>This works well, but I'd like to hide the #load_more button if all the data is loaded on the client, using a helper like this:</p>
  
  <pre><code>Template.post_list.allPostsLoaded = function () {
    allPostsLoaded = Posts.find().count() &lt;= this.subscriptionHandle.loaded();
    Session.set('allPostsLoaded', allPostsLoaded);
    return allPostsLoaded;
  };
  </code></pre>
  
  <p>The problem is that Posts.find().count() is returning the number of documents loaded on the client, not the number available on the server.  </p>
  
  <p>I've looked through the <a href="https://github.com/SachaG/Telescope" rel="noreferrer">Telescope</a> project, which also uses the meteor-paginated-subscription package, and I see <a href="https://github.com/SachaG/Telescope/blob/master/client/views/posts/posts_list.js" rel="noreferrer">code</a> that does what I want to do:</p>
  
  <pre><code>allPostsLoaded: function(){
    allPostsLoaded = this.fetch().length &lt; this.loaded();
    Session.set('allPostsLoaded', allPostsLoaded);
    return allPostsLoaded;  
  }
  </code></pre>
  
  <p>But I'm not sure if it's actually working.  Porting their code into mine does not work.</p>
  
  <p>Finally, it does look like Mongo supports what I want to do. The <a href="http://docs.mongodb.org/manual/reference/method/cursor.count/" rel="noreferrer">docs</a> say that, by default, cursor.count() ignores the effects of limit.  </p>
  
  <p>Seems like all the pieces are there, but I'm having trouble putting them together.</p>