public function countComments()
{
$params = array('entity' => $this);
$num = _elgg_services()->hooks->trigger('comments:count', $this->getType(), $params);
if (is_int($num)) {
return $num;
} else {
return elgg_get_entities(array('type' => 'object', 'subtype' => 'comment', 'container_guid' => $this->getGUID(), 'count' => true, 'distinct' => false));
}
}