Get the count for an activity.

@since 2.7.7

@param  string $activity The name of the activity.
@return int              The activity's count.
978740
public function getActivityCount( $activity ) {
		$plugin_activities = $this->getPluginActivities();

		return empty( $plugin_activities[ $activity ] ) ? 0 : $plugin_activities[ $activity ];
	}
1094316
public function count()
    {
        return count($this->filter($this->menu[$this->getLang()], $this->_where, $this->_with));
    }
61431
public function count() : int
    {
        return (int)$this->getQueryBuilder()
            ->count('*')
            ->from($this->table)
            ->execute()->fetchColumn(0);
    }
610183
public static function countClass($class)
    {
        $class = ObjectHelper::getClass($class);
        $count = 0;
        do {
            if (!empty(self::$events[$class])) {
                $count += count(static::$events[$class]);
            }
        } while (($class = get_parent_class($class)) !== false);

        return $count;
    }
1199238
public static function count($where = null): int
    {
        $select = static::select();

        if ($where !== null) {
            if ($where instanceof Where) {
                $select->field('COUNT(*)', 'total');
                $select->where(clone $where);

            } else if (is_array($where)) {
                $select->field('COUNT(*)', 'total');
                foreach ($where as $field => $value) {
                    $select->where($field, $value);
                }

            } else if (!is_array(static::$primaryKey) && (is_numeric($where) || is_string($where))) {
                $select->field('COUNT(' . static::$primaryKey . ')', 'total');
                $select->where(static::$primaryKey, $where);

            }
        } else {
            $pk = is_string(static::$primaryKey) ? static::$primaryKey : '*';
            $select->field('COUNT(' . $pk . ')', 'total');
        }

        $results = $select->fetchAll();

        if (isset($results[0])) {
            $r = $results[0];
            if (array_key_exists('total', $r)) {
                return (int)$r['total'];
            } else {
                return 0;
            }
        } else {
            return 0;
        }
    }
706000
public function count($column = NULL) {
		if ($this->selection === null) {
			$this->read();
		}
		return $this->selection->count($column);
	}
610229
public function count()
    {
        if ($this->action() !== self::ACTION_READ) {
            return 0;
        }

        if (!$this->__resultSet) {
            $this->_execute();
        }

        if ($this->__resultSet) {
            return $this->__resultSet->total();
        }

        return 0;
    }
532658
function count()
    {
        $realm = $this->getRealm();


        try {
            $sql = "SELECT COUNT(*) as has_key FROM `KVStore` WHERE `realm` = '$realm';";
            $stm = $this->pdo->prepare($sql);
            $stm->execute();
            $stm->setFetchMode(\PDO::FETCH_ASSOC);

            $count = $stm->fetch();
            $count = (int) $count['has_key'];

        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }

        return $count;
    }
332934
public function count($field = '*')
    {
        $copy = clone $this;

        $copy->_limit = null;
        $copy->_offset = null;
        $copy->_order = null;
        $copy->_aggregate['count'] = ['$sum' => 1];
        $r = $copy->execute();

        return $r ? $r[0]['count'] : 0;
    }
417796
public function editActivity(Activity $activity)
    {
        $this->om->persist($activity);
        $this->om->flush();
        $this->initializePermissions($activity);

        return $activity;
    }
301005
def count_duplicate_activities(activity, after)
      entities = { }

      activity.entities.each do |entity_name, entity|
        entities[entity_name.to_sym] = entity.model_id
      end

      self.count_activities({
        :only     => activity.class,
        :entities => entities,
        :after    => after,
      })
    end
1247489
public function getActivityCountQuery(array $options)
    {
        // Find out how many entries we're paging form
        $qb = $this->createQueryBuilder();
        $qb->select('COUNT(id) as count');

        $this->addWhereActivity($qb, $options);

        return $qb;
    }
279140
public function getNestedCount( $pattern = NULL )
	{
		$count	= 0;
		foreach( $this->getNestedList( $pattern ) as $entry )
			$count++;
		return $count;
	}
687307
public function count(string $column = '*'): int
    {
        $select = clone $this;

        //To be escaped in compiler
        $select->columns = ["COUNT({$column})"];
        $select->ordering = [];
        $select->grouping = [];

        $st = $select->run();
        try {
            return (int)$st->fetchColumn();
        } finally {
            $st->close();
        }
    }
119946
public function count($model)
    {
        $method = 'search_count';

        $condition = $this->condition ?: [[]];

        $result = $this->call($model, $method, $condition);

        //Reset params for future queries.
        $this->resetParams('condition');

        return $this->makeResponse($result, 0);

    }
979081
public function count($substring = null) {
		if ($substring === null) {
			return mb_strlen($this->rawString, $this->charset);
		}
		else {
			return mb_substr_count($this->rawString, $substring, $this->charset);
		}
	}
589314
public function getCount($key)
	{
		$key = strtolower($key);
		
		if(array_key_exists($key, $this->data))
		{
			if(is_array($this->data[$key]))
			{
				return count($this->data[$key]);
			}
			
			return 1;
		}
		
		return 0;
	}