public function count()
{
if (!is_callable($this->getter)) {
$inspector = new \Elgg\Debug\Inspector();
throw new RuntimeException("Getter is not callable: " . $inspector->describeCallable($this->getter));
}
$options = $this->options + ['count' => true];
return call_user_func($this->getter, $options);
}