What is the best way to count the total matching records?
This works, but it is beneficent:
$records = DataObject::get($obj, $filter, $sort, $join);
$recordsCount = count($records);
I don't need to run the full query. I only want to count the total available records.
Is there a graceful way to do something like this?
$recordsCount = DataObject::count($obj, $filter, $sort, $join);