I think I see the issue: my first example doesn't include regions with no cities.
You probably will have to do it the old-fashioned way:
Code:
$regions = new Region();
$regions->get();
foreach($regions as $region) {
// here's a region
$region->city->get();
$number_of_cities = count($region->city->all);
foreach($region->city as $city) {
// here's a city
}
}
(That creates more queries, of course.)
There's no practical way with DMZ to combine a $has_many relationship into one query.
(Well, that's not 100% true. I have a trick you can use on PostgreSQL to get the results of $has_many relationships, but it's kinda hacky, and, again, only works on PostgreSQL.)