I found solutions for this problem only with snapshot, which downloads the whole database. It would be great to send a request to Firebase server which would respond the total number of records. Downloading the whole database is not really efficient. Any idea?
Related questions. (Most suggest watching value
event, and checking size of the downloaded records... not efficient.)
Firebase better way of getting total number of records
Total number of records in Firebase (when am I done counting?)