The reason why the number of products within those collections did not match initially when you enabled Markets Indexing is likely due to the smart collection pages. When using Smart Automated Collections, there may be a delay on the Shopify side in sending the necessary webhook(s).
This issue will normally resolve itself within 24 hours. If the discrepancy persists for more than 24 hours, please contact Algolia Support.