Context:
When querying dag runs in the stable API, it is possible to filter by date range and to receive paginated results. Pagination returns a subset of results, but a count of all available results is returned.

Expected behavior:
The total count should take place after filtering by date, and before paginating results.

Actual behavior:
The count is made prior to filtering by date. This means that the total number of accessible dags is returned, rather than the number of dags the user filtered for.

https://github.com/apache/airflow/pull/10594/files/1fe1da978763c9919cee0d2c7eccd96438631993#diff-3239f89a092764597348cabc5e74c2f5R125

I will make this change after #10594 is merged.
tests/api_connexion/endpoints/test_dag_run_endpoint.py
#
#
import unittest
from datetime import timedelta
from parameterized import parameterized
from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
from airflow.models import DagModel, DagRun
from airflow.security import permissions
from airflow.utils import timezone
from airflow.utils.session import create_session, provide_session
from airflow.utils.types import DagRunType
from airflow.www import app
from tests.test_utils.api_connexion_utils import assert_401, create_user, delete_user
from tests.test_utils.config import conf_vars
from tests.test_utils.db import clear_db_dags, clear_db_runs
class TestDagRunEndpoint(unittest.TestCase):