--- title: Why are result counts inaccurate with folding enabled? slug: '429' canonical_url: https://docs.coveo.com/en/429/ collection: javascript-search-framework source_format: adoc --- # Why are result counts inaccurate with folding enabled? > **Note** > > This page assumes you have followed the appropriate steps to implement result folding on your page (see [Folding results](https://docs.coveo.com/en/428/)). If you enable result folding in your search page, you may notice that facet value result counts aren't always accurate. Moreover, the total number of query results displayed by the `QuerySummary` component might change when you load a new page of results using the `Pager` component. These issues are caused by known index limitations. * Mismatching facet/query summary result counts can be explained by the fact that the index makes no distinction between _child_ and _parent_ results when evaluating facet value counts: both types of results are indiscriminately counted, if they match the [Group By](https://docs.coveo.com/en/203/) operation the facet relies on. **Example** * In a search page in which result folding is enabled, in the `Author` facet, you select the `John Doe` value. This facet value indicates a result count of 12. This result count, which has already been evaluated by the index, takes into account all results whose `@author` field value is `John Doe`, regardless of whether those results are _parents_ or _children_ in folding relationships. * The `QuerySummary` component states that the [query](https://docs.coveo.com/en/231/) you triggered by selecting the `John Doe` facet value only returned 10 results. In fact, two of the results which are included in the facet value result count were _child_ results (replies, attachments, etc.). Those results have been folded under their respective _parent_ when you triggered a query by selecting the `John Doe` facet value. The `QuerySummary` count only includes the _parent_ results of the folded relationships. * Mismatching pager/query summary result counts can be explained by the fact that the index only folds the requested page of results. **Example** * You send a query from a search page in which result folding is enabled. The result list displays 10 results per page. A total of 35 _unfolded_ results match the query. Suppose that 20 of those are _parent_ results and 15 are _child_ results. Since only 10 results were requested, the index only returns up to 10 folded results. For the sake of simplicity, assume that each of the first 10 results is a _parent_ with a single folded _child._ This means that there are 15 _unfolded_ results left (that is, 35 _unfolded_ results - (10 _parent_ results + 10 _child_ results)). * The `QuerySummary` component states that the query returned 25 results (the 10 currently displayed _folded_ results + the 15 remaining _unfolded_ results). Since the result list is displaying 10 results per page, 3 pages of results are currently available. * You interact with the `Pager` component to switch to the second page of results. The index folds the next page of results. It folds 1 child result under each of the first 5 parent results. There are no more parent-child relationships to fold. * The `QuerySummary` component now states that there are 20 results (15 "folded" results + 5 results that don't have children). The third page of results is gone.