Can I ask a really, really dumb question? How do you count the number of resources returned by getResources? I am calling getResources from within my DIY snippet like so and trying to count the number of resources returned:
$tvfilter = 'region=='.$region.',sleeps=='.$sleeps;
$output = $modx->runSnippet('getResources',array(
'parents' => '22',
'tpl' => 'villalist',
'limit' => '20',
'depth' => '1',
'showHidden' => 0,
'includeContent' => 0,
'includeTVs' => 1,
'processTVs' => 1,
'tvPrefix' => '',
'sortBy' => RAND(),
'tvFilters' => $tvfilter
));
$resultsquantity = count($output);
Regardless of the actual number of resources returned the count function always returns 1.
There must be a really simple way to do this. Can't see anything in the getResources documentation, though.