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
'state': 'running',
                    'execution_date': self.default_time_2,
                    'external_trigger': True,
                    'start_date': self.default_time,
                    'conf': {},
                },
            ],
            "total_entries": 2,
        }
    def test_should_return_all_with_tilde_as_dag_id_and_all_dag_permissions(self):
        self._create_test_dag_run(extra_dag=True)
        expected_dag_run_ids = ['TEST_DAG_ID', 'TEST_DAG_ID', "TEST_DAG_ID_3", "TEST_DAG_ID_4"]
        response = self.client.get("api/v1/dags/~/dagRuns", environ_overrides={'REMOTE_USER': "test"})
        assert response.status_code == 200
        dag_run_ids = [dag_run["dag_id"] for dag_run in response.json["dag_runs"]]
        assert dag_run_ids == expected_dag_run_ids
    def test_should_return_accessible_with_tilde_as_dag_id_and_dag_level_permissions(self):
        self._create_test_dag_run(extra_dag=True)
        expected_dag_run_ids = ['TEST_DAG_ID', 'TEST_DAG_ID']
        response = self.client.get(
            "api/v1/dags/~/dagRuns", environ_overrides={'REMOTE_USER': "test_granular_permissions"}
        )
        assert response.status_code == 200
        dag_run_ids = [dag_run["dag_id"] for dag_run in response.json["dag_runs"]]
        assert dag_run_ids == expected_dag_run_ids
    def test_should_raises_401_unauthenticated(self):
        self._create_test_dag_run()
        response = self.client.get("api/v1/dags/TEST_DAG_ID/dagRuns")
        assert_401(response)
class TestGetDagRunsPagination(TestDagRunEndpoint):