if (dg instanceof ERXDisplayGroup) {
ERXDisplayGroup erxdg = (ERXDisplayGroup) dg;
return erxdg.filteredObjects().count();
}
int result=0;
EOQualifier q=dg.qualifier();
if (q!=null) {
result=EOQualifier.filteredArrayWithQualifier(dg.allObjects(),q).count();
} else {
result=dg.allObjects().count();
}