@param $frequency
@param $groupSize
@param $count
@param $byeCount

@return bool
175958
private
    function shouldInsertBye($frequency, $count, $byeCount, $numByeTotal): bool
    {
        return $count != 0 && $count % $frequency == 0 && $byeCount < $numByeTotal;
    }
1316157
public function set_count($try, $count) {
        $this->totalcount = $this->totalcount + $count;
        $this->trycount[$try] = $count;
    }
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);
		});
	}
446552
public function setParcelCount($count)
    {
        $this->set(Config::T8905, (string)$count);
        $this->set(Config::T8702, (string)$count);

        return $this;
    }
610273
public function count($field = '*', $isMulti = false, $useMaster = false)
    {
        return $this->aggregation($field, $isMulti, $useMaster, 'COUNT');
    }
1151420
public function copy($frequency, $destBlock)
    {
        $frequencyCloned = clone $frequency;
        $frequencyCloned->setBlock($destBlock);

        $this->om->persist($frequencyCloned);

        return $frequencyCloned;
    }
868063
public function memoryUsage($key, $count = null) {
        return $this->returnCommand(['MEMORY', 'USAGE'], [$key], isset($count) ? [$key, 'SAMPLES', $count] : [$key]);
    }
1061050
public function chunkById($count, callable $callback, $column = null, $alias = null)
    {
        $column = $column ?? $this->getRelated()->getQualifiedKeyName();

        $alias = $alias ?? $this->getRelated()->getKeyName();

        return $this->prepareQueryBuilder()->chunkById($count, $callback, $column, $alias);
    }
1277048
public function setCount( $count )
	{
		if ( $count == $this->getCount() ) { return; }

		$this->_values['count'] = (string) $count;
		$this->setModified();
	}
182896
public static function getCalendars($container, $count = false) {
		if (!$container instanceof ElggEntity) {
			return false;
		}

		$options = array(
			'type' => 'object',
			'subtype' => 'calendar',
			'container_guid' => $container->guid,
			'limit' => false
		);

		if ($count) {
			$options['count'] = true;
			return elgg_get_entities($options);
		}

		return new ElggBatch('elgg_get_entities', $options);
	}
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;
    }
289939
private function read($count) {
        $count = abs($count);

        if ($count > 0) {
            return fread($this->STREAM, $count);
        }

        return NULL;
    }
724490
public function sRandMember($key, $count = null, $distinctOnly = true) {
        $payload = ['srandmember', $key];

        if ($count !== null) {
            $payload[] = $distinctOnly ? $count : -$count;
        }

        return $this->send($payload);
    }
521967
public function counter($metric, $count = 1, array $tags = array(), $sampleRate = AbstractMetric::DEFAULT_SAMPLE_RATE)
    {
        return new Counter($this->prefix($metric), $count, array_merge($this->defaultTags, $tags), $sampleRate);
    }
317239
public function countCustomerCustomerGroups(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collCustomerCustomerGroupsPartial && !$this->isNew();
        if (null === $this->collCustomerCustomerGroups || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collCustomerCustomerGroups) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getCustomerCustomerGroups());
            }

            $query = ChildCustomerCustomerGroupQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByCustomerGroup($this)
                ->count($con);
        }

        return count($this->collCustomerCustomerGroups);
    }
7093
public function hitLimits($region, $count = 1)
	{
		foreach ($this->limits as $limit)
		{
			if ($limit->getRegion() == $region &&
				! $limit->hit($count)
			)
			{
				return false;
			}
		}

		return true;
	}
436337
public function stream_read($count)
    {
        if ($this->stream_eof()) {
            return false;
        }
        $s = substr($this->data, $this->pos, $count);
        $this->pos += $count;
        return $s;
    }