Return the number of record which does not have a UUID

@param \databox $databox
775646
protected function getDataboxTimeEstimation(\databox $databox)
    {
        $sql = 'SELECT r.coll_id, r.type, r.record_id, s.path, s.file, r.xml
                FROM record r, subdef s
                        WHERE ISNULL(uuid)
                        AND s.record_id = r.record_id AND s.name="document"
                        AND parent_record_id = 0';

        $stmt = $databox->get_connection()->prepare($sql);
        $stmt->execute();
        $quantity = $stmt->rowCount();
        $stmt->closeCursor();

        return $quantity;
    }
860214
protected function ensureDropMigrateColumn(\databox $databox)
    {
        $sql = 'ALTER TABLE `record` DROP `migrate35` ';
        $stmt = $databox->get_connection()->prepare($sql);
        $stmt->execute();
        $stmt->closeCursor();
    }
401605
public function getDataboxCollectionsAction(Request $request, $databox_id)
    {
        $ret = [
            "collections" => $this->listDataboxCollections($this->findDataboxById($databox_id)),
        ];

        return Result::create($request, $ret)->createResponse();
    }
1160076
private function get_index_row($mailbox)
    {
        // Get index from DB
        $sql_result = $this->db->query(
            "SELECT `data`, `valid`"
            ." FROM {$this->index_table}"
            ." WHERE `user_id` = ?"
                ." AND `mailbox` = ?",
            $this->userid, $mailbox);

        if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
            $data  = explode('@', $sql_arr['data']);
            $index = $this->db->decode($data[0], true);
            unset($data[0]);

            if (empty($index)) {
                $index = new rcube_result_index($mailbox);
            }

            return array(
                'valid'      => $sql_arr['valid'],
                'object'     => $index,
                'sort_field' => $data[1],
                'deleted'    => $data[2],
                'validity'   => $data[3],
                'uidnext'    => $data[4],
                'modseq'     => $data[5],
            );
        }

        return null;
    }
1037961
protected function computeQuantity()
    {
        $n = 0;

        foreach ($this->container->getDataboxes() as $databox) {
            $n += $databox->get_record_amount();
        }

        return $n;
    }
426952
public function getDataMember( $dataMember )
    {
        if( $dataMember === 'related_images' )
        {
            $images = array();
            $relations = $this->ContentObjectAttribute->attribute( 'content' );
            foreach ( $relations['relation_list'] as $relation )
            {
                $object = eZContentObject::fetch( $relation['contentobject_id'] );
                if( $object instanceof eZContentObject )
                {
                    $dataMap = $object->attribute( 'data_map' );
                    foreach ( $dataMap as $attribute )
                    {
                        /** @var eZContentObjectAttribute $attribute */
                        if ( $attribute->attribute( 'data_type_string' ) !== eZImageType::DATA_TYPE_STRING )
                        {
                            continue;
                        }

                        if ( $attribute->hasContent() )
                        {
                            $imageAliasHandler = $attribute->attribute( 'content' );
                            $imageAlias = $imageAliasHandler->imageAlias( 'opengraph' );
                            if( $imageAlias['is_valid'] == 1 )
                            {
                                $images[] = eZSys::serverURL() . '/' . $imageAlias['full_path'];
                            }
                        }
                    }
                }
            }

            if ( empty( $images ) )
            {
                $images[] = eZSys::serverURL() . eZURLOperator::eZImage( null, 'opengraph_default_image.png', '' );
            }

            return $images;
        }

        return $this->getData();
    }
135566
public function getReorder($databox_id)
    {
        $acl = $this->getAclForUser();

        return $this->render('admin/collection/reorder.html.twig', [
            'collections' => $acl->get_granted_base([], [$databox_id]),
        ]);
    }
1209726
public function setIndexable(Request $request, $databox_id)
    {
        $success = false;

        try {
            $databox = $this->findDataboxById($databox_id);
            $indexable = !!$request->request->get('indexable', false);
            $this->getApplicationBox()->set_databox_indexable($databox, $indexable);
            $success = true;
        } catch (\Exception $e) {

        }

        if ('json' === $request->getRequestFormat()) {
            return $this->app->json([
                'success' => $success,
                'msg'     => $success ? $this->app->trans('Successful update') : $this->app->trans('An error occured'),
                'sbas_id' => $databox_id,
            ]);
        }

        return $this->app->redirectPath('admin_database', [
            'databox_id' => $databox_id,
            'success'    => (int) $success,
        ]);
    }
926035
protected function GetRemainingRowCount()
    {
        $aTableList = $this->aTablesToProcess;
        $iCount = 0;
        foreach ($aTableList as $iWorkId) {
            $oIndexQuery = TdbShopSearchQuery::GetNewInstance();
            /** @var $oIndexQuery TdbShopSearchQuery */
            if ($oIndexQuery->Load($iWorkId)) {
                $iCount = $iCount + $oIndexQuery->NumberOfRecordsLeftToIndex();
            }
        }

        return $iCount;
    }
647255
public function count_records($table)
	{
		// Quote the table name
		$table = $this->quote_table($table);

		return $this->query(\DB::SELECT, 'SELECT COUNT(*) AS total_row_count FROM '.$table, false)
			->get('total_row_count');
	}
1073744
public function &LastRow($DatasetType = FALSE) {
      $Result = &$this->Result($DatasetType);
      if (count($Result) == 0)
         return $this->_EOF;

      return $Result[count($Result) - 1];
   }
1202777
public function getCounter($listUuid)
    {
        $sql = 'SELECT `uuid` FROM `'.self::LIST_ELEMENT_TABLE_NAME.'` WHERE `list` = :list';
        $stmt = $this->pdo->prepare($sql);
        $stmt->bindParam(':list', $listUuid);
        $stmt->execute();

        return $stmt->rowCount();
    }
1210554
public function getRecordAction(Request $request, $databox_id, $record_id)
    {
        try {
            $record = $this->findDataboxById($databox_id)->get_record($record_id);

            return Result::create($request, ['record' => $this->listRecord($request, $record)])->createResponse();
        } catch (NotFoundHttpException $e) {
            return Result::createError($request, 404, $this->app->trans('Record Not Found'))->createResponse();
        } catch (\Exception $e) {
            return $this->getBadRequestAction($request, $this->app->trans('An error occurred'));
        }
    }
1178728
public function getUuids($count = 1)
    {
        $count = (int) $count;
        $response = $this->httpClient->request('GET', '/_uuids?count='.$count);

        if ($response->status != 200) {
            throw new CouchDBException('Could not retrieve UUIDs from CouchDB.');
        }

        return $response->body['uuids'];
    }
321561
protected function _createUid($mailbox)
    {
        $doc = array(
            self::BASE_HOSTSPEC => $this->_params['hostspec'],
            self::BASE_MAILBOX => $mailbox,
            self::BASE_PORT => $this->_params['port'],
            self::BASE_USERNAME => $this->_params['username']
        );
        $this->_db->selectCollection(self::BASE)->insert($doc);

        return $this->_getUid($mailbox);
    }
274877
public static function get_record_by_uuid(\databox $databox, $uuid, $record_id = null)
    {
        $records = $databox->getRecordRepository()->findByUuid($uuid);

        if (!is_null($record_id)) {
            $records = array_filter($records, function (record_adapter $record) use ($record_id) {
                return $record->getRecordId() == $record_id;
            });
        }

        return $records;
    }
858349
public function countData(DataRequest $request)
    {
        $userManager = $this->framework->getInstance('\\Zepi\\Web\\AccessControl\\Manager\\UserManager');
        $numberOfUsers = $userManager->count($request);
        
        return $numberOfUsers;
    }