Implement custom `totalCount` step from connection step
<!-- Before opening an issue: if you use `npm` try running `yarn` instead; if
      you run `yarn`, please try running `npx yarn-deduplicate && yarn`. -->

<!-- You can also chat with us on Discord: http://discord.gg/graphile -->

### Summary
[discord context](https://discord.com/channels/489127045289476126/1346789719954161756/1346915146551005306)

How to create custom implementation of `totalCount`, where I want to cap the number of rows, to avoid scanning very large tables. What I want to do, is to clone the parent connection with the filters client have sent, but remove the pagination from them, and instead run `setFirst` according to my cap params, and run count on the aggregate. Example

```ts
const $clone = $connection.cloneSubplanWithPagination('normal');
$clone.setFirst(constant(cap)); // for example 100000 rows
return connection($clone)
  .cloneSubplanWithoutPagination('aggregate')
  .singleAsRecord()
  .select(sql`count(*)`, TYPES.bigint, false) as any;
```

### Additional context

<!-- Please provide additional context such as environment versions (including
      operating system, Node, PostgreSQL, Redis, etc. as relevant), software
      versions (from `yarn.lock`) or similar, plugins in use, database schema
      if relevant, bundler (if any). -->
