title: Get size of the query in Firestore
body: <p>How would one get whole query size efficiently from the Firestore collection which has thousands of documents?</p>
  
  <p>In my case I query documents by few different rules:</p>
  
  <ul>
  <li>Start date</li>
  <li>End date</li>
  <li>Place id</li>
  <li>Keywords</li>
  </ul>
  
  <p>Then I limit the query to show only 50 records but I would need to get the size of the query without this limitations since that way pagination would show correctly in the front end.</p>
  
  <p>I could use cloud function which makes the same query as earlier but without limit and then get size of it, but is there more efficient way of doing this? Query size could be thousands of documents so is there any performance issues by doing it this way? And how does the billing work on this kind of situation?</p>
  
  <p>If ie. My query is 1500 documents is there going to be 1500 read operations to get the size of this query?</p>
  
  <p>There has been other topics which recommends using counters to get size of the collection, but this does not suit my approach since the size depends on user's search parameters stated above.</p>
  
  <p>All recommendations for this problem are welcome!</p>