Hello World,

In a large catalog where product count in a category exceed 10k in Magento2, The category shows products count 10000 only.

This value is added in search_request.xml in Magento/CatalogSearch module.

            <bucket name="price_bucket" field="price" xsi:type="dynamicBucket" method="$price_dynamic_algorithm$">
                <metrics>
                    <metric type="count"/>
                </metrics>
            </bucket>
            <bucket name="category_bucket" field="category_ids" xsi:type="termBucket">
                <metrics>
                    <metric type="count"/>
                </metrics>
            </bucket>
        </aggregations>
        <from>0</from>
        <size>10000</size>
    </request>
</requests>

To override this value, create a module and define own value in size node.

Step 1 : Define New Module.

Create VendorName/PackageName directory in app/code.

Create etc/module.xml and registration.php in your PackageName.

<?php
// filepath: Credevlab/ExtendedCatalogSearch/registration.php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Credevlab_ExtendedCatalogSearch',
    __DIR__
);

<?xml version="1.0"?>
<!-- filepath: Credevlabz/ExtendedCatalogSearch/etc/module.xml -->
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Credevlabz_ExtendedCatalogSearch" setup_version="1.0.0">
        <sequence>
            <module name="Magento_CatalogSearch" />
        </sequence>
    </module>
</config>

2. Create search_request.xml which will be overwriting the values in CatalogSearch Module.

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<requests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:framework:Search/etc/search_request.xsd">
    <request query="catalog_view_container" index="catalogsearch_fulltext">
        <size>{{your preferred value}}</size>
    </request>
</requests>

You will find size value defined in 3 requests, I have extended it for catalog view only, you can extended for search results as well.