Increment a counter using the classic API.

@see https://www.stathat.com/manual/send#classic
@param string $stat_key - Private key identifying the stat
@param int $count - Number you want to count
@throws \Exception
500743
public function count($stat_key, $count = 1)
    {
        if (! isset($this->config['user_key'])) {
            throw new Exception('StatHat user key not set.');
        }

        $this->post('c', ['ukey' => $this->config['user_key'], 'key' => $stat_key, 'count' => $count]);
    }
1350325
public function reportCount($count) {
    $statName = $this->prefix . $this->statNames;
    if ($this->isProduction) {
      stathat_ez_count($this->ezkey, $statName, $count);
    }
  }
135459
protected function counter() {
    if($this->nodb) {
      return;
    }

    $this->query("select count(*) from information_schema.tables ".
                 "where (table_schema = '$this->masterdb') and (table_name = 'counter')");

    list($ok) = $this->fetchrow('num');
      
    if($ok == 1) {
      $filename = $this->requestUri; // get the name of the file

      if(!(($this->isMe()) && ($this->countMe === false))) {
        // realcnt is ONLY NON BOTS
        
        $realcnt = $this->isBot ? 0 : 1;

        // count is total of ALL hits!

        $sql = "insert into $this->masterdb.counter (site, filename, count, realcnt, lasttime) ".
               "values('$this->siteName', '$filename', '1', '$realcnt', now()) ".
               "on duplicate key update count=count+1, realcnt=realcnt+$realcnt, lasttime=now()";

        $this->query($sql);
      }

      // Now retreive the hit count value after it may have been incremented

      list($cnt) = $this->queryfetch("select realcnt ".
                                     "from $this->masterdb.counter ".
                                     "where site='$this->siteName' and filename='$filename'");
      
      $this->hitCount = ($cnt[0]) ? $cnt[0] : 0;
    } else {
      $this->debug("$this->siteName: $this->self: table counter does not exist in the $this->masterdb database");
    }      
  }
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;
	}
851759
public function increment_count($try = 0) {
        $this->totalcount++;
        if ($try != 0) {
            if ($try > analyser::MAX_TRY_COUNTED) {
                $try = analyser::MAX_TRY_COUNTED;
            }
            if (!isset($this->trycount[$try])) {
                $this->trycount[$try] = 0;
            }
            $this->trycount[$try]++;
        }

    }
384783
public static long count(nitro_service service, String certkey) throws Exception{
		sslcertkey_crldistribution_binding obj = new sslcertkey_crldistribution_binding();
		obj.set_certkey(certkey);
		options option = new options();
		option.set_count(true);
		sslcertkey_crldistribution_binding response[] = (sslcertkey_crldistribution_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
1079889
public function lrem($key, $count, $value) {
        return $this->returnCommand(['LREM'], $key, [$key, $count, $value]);
    }
725563
public function value($stat_key, $value)
    {
        if (! isset($this->config['user_key'])) {
            throw new Exception('StatHat user key not set.');
        }

        $this->post('v', ['ukey' => $this->config['user_key'], 'key' => $stat_key, 'value' => $value]);
    }
149784
private static <E> Counter<Integer> collectCountCounts(Counter<E> counts) {
    Counter<Integer> cc = new ClassicCounter<Integer>(); // counts of counts
    for (Map.Entry<E, Double> entry : counts.entrySet()) {
      //E item = entry.getKey();
      Integer count = (int) Math.round(entry.getValue());
      cc.incrementCount(count);
    }
    return cc;
  }
415392
static public function count($countable, $count, $message = null, $propertyPath = null)
        {
            if ($count !== count($countable)) {
                $message = $message ?: sprintf(
                    'List does not contain exactly "%d" elements.',
                    static::stringify($countable),
                    static::stringify($count)
                );

                throw static::createException($countable, $message, static::INVALID_COUNT, $propertyPath, array('count' => $count));
            }
        }
760231
public function searchTweets($query, $count = 10)
	{	
		if ($this->bearer_token == null) {
			throw new \Exception('Incorrect token. You need to obtain correct Bearer token in order to make calls to the API. Check if your API keys are correct.');
		}

		$this->makeRequest($query, $count);
	}
740346
public void printCount(String kind, int count) {
        if (count != 0) {
            String key;
            if (count == 1)
                key = "count." + kind;
            else
                key = "count." + kind + ".plural";
            log.printLines(WriterKind.ERROR, key, String.valueOf(count));
            log.flush(Log.WriterKind.ERROR);
        }
    }
1246818
public final void mCOUNT() throws RecognitionException {
		try {
			int _type = COUNT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:17:7: ( 'count' )
			// hql.g:17:9: 'count'
			{
			match("count"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
979128
private function addMultiExecCount(MultiExec $multi, $subject, $bucket, $count)
    {
        // Get the counts from the previous `$count` buckets
        $multi->hget($subject, $bucket);
        while ($count--) {
            $multi->hget($subject, (--$bucket + $this->bucketCount) % $this->bucketCount);
        }
    }
577792
public function getConstrainedKeysByCount($count, $operator = '>=')
	{
		$associativeTable = $this->associativeTable;
		$associativeLocal = $this->associativeLocal;
		$shifter          = $this->shifter;
		$model            = $this->model;

		return $this->getConstrainedKeys(function($related) use ($count, $associativeTable, $associativeLocal, $shifter, $model, $operator)
		{
			$related->whereEquals($associativeTable . '.' . $shifter, strtolower($model->getModelName()))
			        ->group($shifter)
			        ->group($associativeLocal)
			        ->having('COUNT(*)', $operator, $count);
		});
	}
861578
public function count($count)
    {
        if (!is_int($count)) {
            throw new InvalidIntException('count', $count);
        } elseif ($count < 0) {
            throw new NumberNotGreaterException('count', $count, 0);
        }

        if (!is_array($this->value)) {
            throw new InvalidArrayException($this->name, $this->value);
        }

        if (count($this->value) !== $count) {
            throw new InvalidArrayCountException($this->name, $this->value, $count);
        }

        return $this;
    }
472587
def incr(key, count=1)
      @store.transaction do
        unless @store[key].nil?
          @store[key] = @store[key] + count
        else
          @store[key] = count
        end
      end
    end