Gets the constrained count

@param   int     $count     The count to limit by
@param   string  $operator  The comparison operator used between the column and the count
@return  array
@since   2.0.0
351741
public function getConstrainedKeysByCount($count, $operator = '>=')
	{
		$associativeLocal = $this->associativeLocal;

		return $this->getConstrainedKeys(function($related) use ($count, $associativeLocal, $operator)
		{
			$related->group($associativeLocal)->having('COUNT(*)', $operator, $count);
		});
	}
1340011
private function readPoints($count)
    {
        $points = array();

        for ($i = 0; $i < $count; $i++) {
            $points[] = $this->point();
        }

        return $points;
    }
330444
public function getLastCommand($count = 1) {
    $retval = array();
    for($i = 0; $i < $count; $i++) {
      $retval[] = array_pop($this->command_history);
    }
    return $retval;
  }
606678
public function GetOperationCount($Operation) {
      if ($Operation == 'edits')
         $Operation = array('edit', 'delete');
      else
         $Operation = explode(',', $Operation);
      
      sort($Operation);
      array_map('ucfirst', $Operation);
      $CacheKey = 'Moderation.LogCount.'.implode('.', $Operation);
      $Count = Gdn::Cache()->Get($CacheKey);
      if ($Count === Gdn_Cache::CACHEOP_FAILURE) {
         $Count = $this->GetCountWhere(array('Operation' => $Operation));
         Gdn::Cache()->Store($CacheKey, $Count, array(
            Gdn_Cache::FEATURE_EXPIRY  => 300 // 5 minutes
         ));
      }
      return $Count;
   }
407858
public function take(int $count): Observable
    {
        if ($count === 0) {
            return self::empty();
        }

        return $this->lift(function () use ($count) {
            return new TakeOperator($count);
        });
    }
309125
public function getItems($count = null, $start = 0)
    {
        $matches = $this->gateway->getAll($this->table);
        $matches = $this->applyConditions($matches);
        $matches = $this->applyOrdering($matches);

        if (!empty($this->columns)) {
            $result = $this->applyColumns($matches);
        } else {
            $result = $this->castToEntity($matches);
        }

        return array_slice($result, $start, $count);
    }
104561
private function query($count)
    {
        $this->applyQueryFilters();

        if ($this->hasTranslating()) {
            $this->applyTranslationFilter();
        }

        if ($this->orderBy()) {
            $this->query = $this->query->orderBy(
                                $this->orderBy(),
                                $this->sortBy()
                            );
        }

        if ($count) {
            return $this->query->count();
        }

        if ($this->perPage > 0) {
            return $this->query->paginate($this->perPage);
        }

        return $this->query->get();
    }
783584
public function whereColumn($a, $operator, $b = null)
    {
        $constraint = call_user_func_array(
            [Constraint::class, 'whereColumn'],
            func_get_args()
        );

        return $this->addConstraint($constraint);
    }
578317
final public function limit(int $offsetOrCount, int $count = null)
    {
        if ($count === null) {
            $this->limit['offset'] = 0;
            $this->limit['count']  = $offsetOrCount;
        } else {
            $this->limit['offset'] = $offsetOrCount;
            $this->limit['count']  = $count;
        }

        return $this;
    }
1272088
public static function getValues($count)
    {
        if (!Int::is($count) || $count < 1) {
            throw new \InvalidArgumentException("The \$count parameter must be of type int and greater than zero.");
        }

        $ret = [];
        $flag = 1;
        for ($i = 0; $i < $count; $i++) {
            $ret[] = $flag;
            $flag <<= 1;
        }

        return $ret;
    }
251752
public function read($count)
    {
        if ($this->isEof()) {
            return null;
        }
        $buffer         = substr($this->buffer, $this->position, $count);
        $this->position += $count;
        return $buffer;
    }
45016
public static function fetchListCount()
    {
        $rows = eZPersistentObject::fetchObjectList( self::definition(),
                                                     array(),
                                                     null,
                                                     false,
                                                     null,
                                                     false, false,
                                                     array( array( 'operation' => 'count( * )',
                                                                   'name' => 'count' ) ) );
        return $rows[0]['count'];
    }
529735
private static function getNumPages(int $limit, int $count): int
    {
        return (int) ceil($count / $limit);
    }
668872
public function getPluralSuffixes($count)
	{
		if ($this->callbacks['pluralSuffixes'] !== null)
		{
			return call_user_func($this->callbacks['pluralSuffixes'], $count);
		}
		else
		{
			return array((string) $count);
		}
	}
67208
public function count($conditions = false, $count = '1')
    {
        $this->andWhere($conditions);

        $select = $this->sqlParts['select'];
        $this->select('COUNT(' . $count . ')');
        $count = (int)$this->db->fetchColumn($this->getSqlForSelect(true), $this->params);
        $this->sqlParts['select'] = $select;

        return $count;
    }
18425
private function getOperator($operator)
    {
        $operators = $this->getOperators();

        $key = array_search(strtolower($operator), $operators);

        if ($key !== false && array_key_exists($key, $operators)) {
            return $operators[$key];
        }

        $operators = implode(', ', $operators);

        $message = "Operator: $operator cannot be used in an LDAP query. Available operators are $operators";

        throw new InvalidQueryOperator($message);
    }
403335
public function count($field = null)
    {
        // when no field is given we use *
        if (is_null($field))
        {
            $field = new Expression('*');
        }

        // return the column
        return (int) $this->column(new Func('count', $field));
    }