public function getTagCount($ids)
    {
        $tableName = $this->getTagSource();
        $colNameId = $this->getIdColumn();
        $return    = [];

        if ($tableName && $colNameId) {
            $statement = $this->getConnection()->createQueryBuilder()
                ->select('item_id', 'count(*) as count')
                ->from('tl_metamodel_tag_relation')
                ->where('att_id=:att')
                ->andWhere('item_id IN (:items)')
                ->groupBy('item_id')
                ->setParameter('att', $this->get('id'))
                ->setParameter('items', $ids, Connection::PARAM_INT_ARRAY)
                ->execute();

            while ($row = $statement->fetch(\PDO::FETCH_OBJ)) {
                $itemId = $row->item_id;

                $return[$itemId] = (int) $row->count;
            }
        }

        return $return;
    }