Count Record
@return  Array
543597
public static function count()
    {
        $self      = self::getInstance();

        $statement = $self->makeSelect();
        $execute   = $self->exec($statement, []);

        return $execute->rowCount();
    }
750961
public function getCounts()
    {
        return array(
            'habbo' => count($this->habbo),
            'badges' => count($this->badges),
            'friends' => count($this->friends),
            'groups' => count($this->groups),
            'rooms' => count($this->rooms),
        );
    }
1073286
public function getCount () {
        if ($this->_count === null) {
            $this->_count = $this->getConnection ()->getSlave ()->zcard ($this->name);
        }
        return $this->_count;
    }
971794
public function count() {
        global $DB;
        if ($this->totalcommentcount === null) {
            list($where, $component) = $this->get_component_select_sql();
            $where .= ' AND itemid = :itemid AND commentarea = :commentarea AND contextid = :contextid';
            $params = array(
                'itemid' => $this->itemid,
                'commentarea' => $this->commentarea,
                'contextid' => $this->context->id,
            );
            if ($component) {
                $params['component'] = $component;
            }

            $this->totalcommentcount = $DB->count_records_select('comments', $where, $params);
        }
        return $this->totalcommentcount;
    }
685659
public function count()
    {
        $oldFields = $this->fields;
        $this->fields = 'COUNT(*) as number';
        $number = $this->get();
        $number = $number[0]['number'];
        $this->fields = $oldFields;
        return $number;
    }
1363182
public function count_all()
    {
        if ($this->soft_delete && $this->_temporary_with_deleted !== TRUE)
        {
            $this->_database->where($this->soft_delete_key, (bool)$this->_temporary_only_deleted);
        }

        return $this->_database->count_all($this->_table);
    }
114506
protected function getRecords() {
        if (!$this->_records) {
            $this->_records = new RecordList($this->version, $this->solution['accountSid']);
        }

        return $this->_records;
    }
446494
public function count()
    {
        $ret = $this->conn()->selectCollection($this->table_name)->count($this->where);
        $this->sql = array('table'=> $this->table_name,'where'=>$this->where);

        $this->_clear_var();
        return $ret;
    }
991295
private function count()
    {
        $qb = clone $this->queryBuilder;
        $this->resetSqlParts($qb, ['orderBy'])
            ->setFirstResult(null)
            ->setMaxResults(null);
        $connection = $qb->getConnection();
        $sql = sprintf("SELECT COUNT(*) FROM (%s) _sps_cnt_", $qb->getSQL());
        $stmt = $connection->executeQuery($sql, $qb->getParameters(), $this->parametersTypes);
        $this->totalResultCount = $stmt->fetchColumn();

        return $this->totalResultCount;
    }
1020643
public function getCount()
    {
        if ($this->count === NULL) {
            $this->count = $this->getModel()->getCount();
        }

        return $this->count;
    }
695417
public function getCountAll()
    {
        if ($this->sync && $this->countAll !== null) return $this->countAll;
        
        $query = clone $this->query;
        $query->resetQueryPart('orderBy')
              ->setMaxResults(null)
              ->setFirstResult(null)
              ->select('COUNT(1)');
			  
        $this->fixWhere($query);
                            
        $stmt = $query->execute();  
        if ($stmt->rowCount() > 1) {
            $this->countAll = $stmt->rowCount();
        } 
        else {
            $this->countAll = $stmt->fetchColumn();
        }
        
        return $this->countAll;  
    }
580387
public function count() {
        $sql    = $this->getSQL();
        $values = $this->values;
        if ($sql) {
            try {
                $statement = $this->dialect->prepare($sql);
                $cnt       = false;
                if ($this->batch) {
                    $cnt = 0;
                    foreach ($this->data as $data) {
                        list($da, $where) = $data;
                        foreach ($values as $value) {
                            list ($name, $val, $type, , $rkey) = $value;
                            $rval = isset($where[ $rkey ]) ? $where[ $rkey ] : (isset($da[ $rkey ]) ? $da[ $rkey ] : $val);
                            if (!$statement->bindValue($name, $rval, $type)) {
                                $this->errorSQL    = $sql;
                                $this->errorValues = $values->__toString();
                                $this->error       = 'can not bind the value ' . $rval . '[' . $type . '] to the argument:' . $name;

                                return false;
                            }
                        }
                        $rst = $statement->execute();
                        QueryBuilder::addSqlCount();

                        if ($rst) {
                            $cnt += $statement->rowCount();
                        } else {
                            $this->dumpSQL($statement);

                            break;
                        }
                    }
                } else {
                    foreach ($values as $value) {
                        list ($name, $val, $type) = $value;
                        if (!$statement->bindValue($name, $val, $type)) {
                            $this->errorSQL    = $sql;
                            $this->errorValues = $values->__toString();
                            $this->error       = 'can not bind the value ' . $val . '[' . $type . '] to the argument:' . $name;

                            return false;
                        }
                    }
                    $rst = $statement->execute();
                    QueryBuilder::addSqlCount();

                    if ($rst) {
                        $cnt = $statement->rowCount();
                    } else {
                        $this->dumpSQL($statement);
                    }
                }

                if ($statement) {
                    $statement->closeCursor();
                    $statement = null;
                }

                return $cnt;
            } catch (\PDOException $e) {
                $this->exception   = $e;
                $this->error       = $e->getMessage();
                $this->errorSQL    = $sql;
                $this->errorValues = $values->__toString();

                return false;
            }
        } else {
            $this->error       = 'Can not generate the delete SQL';
            $this->errorSQL    = '';
            $this->errorValues = $values->__toString();
        }

        return false;
    }
431514
public function count()
    {
        $this->countQuery->execute();
        $res = $this->countQuery->fetchColumn();
        $this->countQuery->closeCursor();
        return (int) $res;
    }
193099
def count_records(self, record_counter, file):
        """"""
        counter = record_counter
        events_counter = 0
        for record in file.get_records():
            recid = record[2]
            counter[recid] = counter.get(recid, 0) + 1
            events_counter += 1

        self.stat['user_record_events'] = events_counter
        return counter
662214
public function getTotalRecords()
    {
        $qb = clone $this->queryBuilder;
        $qb->resetDQLPart('orderBy');

        $gb = $qb->getDQLPart('groupBy');

        if (empty($gb) || !in_array($this->fields['_identifier_'], $gb)) {
            $qb->select(
                    $qb->expr()->count($this->fields['_identifier_'])
                    );

            return $qb->getQuery()->getSingleScalarResult();
        } else {
            $qb->resetDQLPart('groupBy');
            $qb->select(
                    $qb->expr()->countDistinct($this->fields['_identifier_'])
                    );

            return $qb->getQuery()->getSingleScalarResult();
        }
    }
1169406
public function count()
    {
        return $this->items !== null
            ? parent::count()
            : (int)current(
                static::db()->query(
                    (clone $this->selFromDbAllQuery())->count()
                )->fetch()
            );
    }
664294
private function queryRecords(): array
    {
        $query = DB::table('dates')
            ->selectRaw('ROUND((d_year + 49) / 100) AS century')
            ->selectRaw('COUNT(*) AS total')
            ->where('d_file', '=', $this->tree->id())
            ->where('d_year', '<>', 0)
            ->where('d_fact', '=', 'BIRT')
            ->whereIn('d_type', ['@#DGREGORIAN@', '@#DJULIAN@'])
            ->groupBy(['century'])
            ->orderBy('century');

        return $query->get()->all();
    }