Set the number of columns in the outer filter
@param int $count
@return static
@throws \InvalidArgumentException
164548
public function setOuterFilterColumnsCount($count)
	{
		if (!in_array($count, [1, 2, 3, 4, 6, 12], true)) {
			throw new \InvalidArgumentException(
				"Columns count must be one of following values: 1, 2, 3, 4, 6, 12. Value {$count} given."
			);
		}

		$this->outer_filter_columns_count = (int) $count;

		return $this;
	}
772959
public function setNumTotal($total)
    {
        if (!is_numeric($total)) {
            throw new InvalidArgumentException(
                'Total Number must be numeric.'
            );
        }

        $total = (int)$total;
        if ($total < 0) {
            throw new InvalidArgumentException(
                'Total Number must be greater than zero.'
            );
        }

        $this->numTotal = $total;

        return $this;
    }
758516
public function incrementAndInvoice(int $count = 1)
    {
        $this->incrementQuantity($count);
        $this->user->invoice();

        return $this;
    }
790017
public function build($count = false)
    {
        $modelNameSpace = $this->model->getModelNameSpace();
        $mm = $this->getDI()->get('modelsManager');
        $query = $mm->createBuilder()->from($modelNameSpace);

        // $columns = $this->model->getAllowedColumns(true);
        $columns = array(
            "$modelNameSpace.*"
        );

        // process hasOne Joins
        $this->queryJoinHelper($query);
        $this->querySearchHelper($query);
        $this->querySortHelper($query);

        if ($count) {
            $query->columns('count(*) as count');
        } else {
            // preserve any columns added through joins
            $existingColumns = $query->getColumns();
            $allColumns = array_merge($columns, $existingColumns);
            $query->columns($allColumns);
        }
        // skip limit if returning a count
        if (!$count) {
            $this->queryLimitHelper($query);
        }

        // todo build fields feature into PHQL instead of doing in PHP
        return $query;
    }
859283
public function first(int $count): Utility
    {
        if ($count < 0) {
            return new static('', $this->encoding);
        }

        return $this->substring(0, $count);
    }
531474
public function count($count = null)
    {
        if ($count === null) {
            return isset($this->options['count']) ? $this->options['count'] : 0;
        } else {
            $this->options['count'] = $count;
            return $this;
        }
    }
434308
public function total($count)
    {
        if ($this->get) {
            $this->total = ($count > $this->limit) ? ceil($count / $this->limit) : 1;
        }
    }
347398
public function setCountFiles(int $count_files) {
        if(!$this->setModified('count_files', $count_files)->isModified()) {
            return $this;
        }
		$this->count_files = $count_files;
		return $this;
    }
1330088
public function setCountMethod(int $method): int
    {
        if (! in_array($method, [self::COUNT_METHOD_SELECT, self::COUNT_METHOD_RECORDCOUNT])) {
            throw new \InvalidArgumentException('Invalid count method');
        }
        $previous = $this->countMethod;
        $this->countMethod = $method;
        return $previous;
    }
861448
private function setCount(Link $link, $count): void
	{
		if (is_array($count)) {
			$link->setCount($count[0], $count[1]);
		} elseif (is_int($count)) {
			$link->setCount($count);
		} else {
			throw new InvalidArgumentException("Wrong argument 'count'");
		}
	}
1214632
public function up ( $count = 0 ) {
        $this->_currentPosition = array(
                                        $this->_currentPosition[0],
                                        $this->_currentPosition[1] - $count,
                                       );
        return $this;
    }
347420
public function iterNextPage($count = 3)
    {
        if ($this->getPage() == 1 && $this->getPagesCount() >= $count * 2) {
            $count *= 2;
        }
        $pages = [];
        foreach (range(1, $count) as $i) {
            $page = $this->getPage() + $i;
            if ($page <= $this->getPagesCount()) {
                $pages[] = $page;
            }
        }

        return $pages;
    }
821165
public function setLimit($count, $offset = null)
    {
        $this->_dsql()->limit($count, $offset);

        return $this;
    }
1123919
public static function repeatHourlyForTotalCount($count, $hours = 1) {
        if($count < 1) {
            throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count));
        }

        return static::simpleSchedule()
            ->withIntervalInHours($hours)
            ->withRepeatCount($count - 1);
    }
1023402
public function generate($count)
    {
        if (!is_int($count) || $count < 1) {
            throw new \InvalidArgumentException(sprintf('%s requires a value greater than 1.', __METHOD__));
        }

        $ownerIds = $this->getValidOwnerIds();

        for ($i = 0; $i < $count; $i++) {
            /** @var Entity\Content $entity */
            $entity = $this->repository->create([
                'datecreated'   => date('Y-m-d H:i:s', time() - rand(0, 365 * 24 * 60 * 60)),
                'datepublish'   => date('Y-m-d H:i:s', time() - rand(0, 365 * 24 * 60 * 60)),
                'datedepublish' => null,
                'status'        => 'published',
            ]);
            $ownerKey = array_rand($ownerIds, 1);
            $entity->setOwnerid($ownerIds[$ownerKey]);

            $this->fillEntity($entity);
        }
        $summary = $this->createSummary;
        $this->createSummary = null;

        return $summary;
    }
790311
public function slice($index, $count = null){
		
		if(!$this->offsetExists($index)){
			throw new \OutOfRangeException('$index is invalid');
		}
		
		$arr = \array_slice($this->_Arr, $index, $count);
		return new static($arr);
		
	}
584371
public function outputFileCount(int $count): void
    {
        if (OutputInterface::VERBOSITY_NORMAL === $this->io->getVerbosity()) {
            $this->progressBar = $this->io->createProgressBar($count);
            $this->progressBar->start();
        } elseif ($this->io->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
            $this->progressBar = new ProgressBar(new NullOutput());
        }
    }