def __len__(self) -> int:
        """Returns the number of records in the current `FeedbackDataset` in Argilla."""
        try:
            if self._has_filters():
                return self._fetch_records(offset=0, limit=1).total
            else:
                response = datasets_api_v1.get_metrics(client=self._client, id=self._dataset.id).parsed
                return response.records.count
        except Exception as e:
            raise Exception(
                f"Failed while getting the metrics from the current `FeedbackDataset` in Argilla with exception: {e}"
            ) from e
Returns the number of records in the current `FeedbackDataset` in Argilla.
argilla-v1/src/argilla_v1/client/feedback/dataset/remote/dataset.py