src/Api/Controller/Note.php
public function getCount(array $aData = [])
    {
        list($sModel, $iItemId) = $this->getModelClassAndId();
        $aData['where'] = [
            ['model', $sModel],
            ['item_id', $iItemId],
        ];

        return Factory::factory('ApiResponse', 'nails/module-api')
                      ->setData($this->oModel->countAll($aData));
    }
public function getCount(array $aData = [])
    {
        list($sModel, $iItemId) = $this->getModelClassAndId();
        $aData['where'] = [
            ['model', $sModel],
            ['item_id', $iItemId],
        ];

        return Factory::factory('ApiResponse', 'nails/module-api')
                      ->setData($this->oModel->countAll($aData));
    }
Counts the number of items for a specific model/item combination

@param array $aData Any data to apply to the requests

@return ApiResponse
@throws ApiException
@throws FactoryException