Thank you, it does work as expected 50%, as it will only show the count of favorites if the list has notifications turned on. But thanks to you pointing me to it, I built a new function from two others in ModelFI.php, and this works as expected:
ModelFI.php:
public function getFavoriteCount( $item_id ) {
$this->dao->select('a.*');
$this->dao->from( $this->getTable_FavoriteItems() . ' a');
$this->dao->where('a.item_id', $item_id );
$result = $this->dao->get();
if( !$result ) { return array(); }
$prepare = $result->result();
return $prepare;
}
item.php:
<?php echo count(ModelFI::newInstance()->getFavoriteCount(osc_item_id())); ?>
Thanks again!