Improve Elasticsearch reindexing document count verification
Description
This improves the document count verification when performing Elasticsearch reindexing operations by directly using Elasticsearch counts for comparison rather than relying on database-stored values.
Why was this needed?
The previous implementation had a potential reliability issue in the verification step. It would:
- Query Elasticsearch and save counts to the database
- Read those counts from the database to do the comparison
This approach introduced unnecessary indirection that could lead to data integrity issues if the database update failed between retrieving and comparing counts.
Related to #502817 (comment 2432750581)