title: Count documents from firestore without counting as reads, Swift
body: <p>I am trying to make a function that counts the number of documents in a collection. This collection contains the users that the user follows, so it can be many documents. I am concerned that each user sees the number of followers count all the documents and count them to me as reads.</p>
  <p>Is there a way to count documents if it counts as reads?</p>
  <p>Function:</p>
  <pre><code>func fetchUserStats() {
              guard let uid = user.id else {return}
              
              COLLECTION_FOLLOWING.document(uid).collection(&quot;user-following&quot;).getDocuments { snapshot, _ in
                  guard let following = snapshot?.documents.count else { return }
              
                  COLLECTION_FOLLOWERS.document(uid).collection(&quot;user-followers&quot;).getDocuments { snapshot, _ in
                  guard let followers = snapshot?.documents.count else { return }
   
                  self.user.stats = UserStats(following: following, followers: followers)
                             }
  
          }
          }
  </code></pre>
  <p>This function counts the number of documents in the collection, so each time a user sees the profile, it counts the documents and shows them the total.</p>
  <p>How can I make it so that it does not count me as reads, or some more functional way?</p>
  <p>Thanks</p>