class_docstr: Returned by :meth:`.SQLAlchemy.paginate`. Takes ``select`` and ``session``
  arguments in addition to the :class:`Pagination` arguments.
  
  .. versionadded:: 3.0
code: def _query_count(self) -> int:
      select = self._query_args["select"]
      sub = (
          select.options(sa_orm.lazyload("*")).order_by(None).subquery()
      )
      session = self._query_args["session"]
      out = session.execute(
          sa.select(sa.func.count()).select_from(sub)
      ).scalar()
      return out
  
imports: from __future__ import annotations
  import typing
  from math import ceil
  import sqlalchemy
  import sqlalchemy.orm
  from flask import abort
  from flask import request
label_desc: Use image node_id 2 for calling the SelectPagination obj's underlying member method code with example usage: obj._query_count() and returns: out