Firestore:the total number of documents in the sample and their portions?

How to get total number of documents in the sample from Google Firestore and how to obtain these documents portions (for example 1 to 20, 21 to 40, etc.)? Thank you.
June 10th 19 at 16:07
1 answer
June 10th 19 at 16:09
To get the number of documents using whereEqualTo, it is necessary to do so:
FirebaseFirestore.getInstance().collection( "name_collection" )
 .whereEqualTo("field", "value" )
.addSnapshotListener(
 new EventListener<querysnapshot>()
{
@Override
 public void onEvent( @Nullable QuerySnapshot value, @Nullable FirebaseFirestoreException e )
{
 // Error handling
 if ( e != null )
{
return;
}

 Log.e( "MESSAGE", "Number of documents" + value.size() );

 // Steps on documents
...
}
}
 );</querysnapshot>

Find more questions by tags Vue.jsNoSQLJavaScriptFirebase