Returns the number of times a client presented a ticket derived from the primary key.
965364
public long ticketKeyResume() {
        Lock readerLock = context.ctxLock.readLock();
        readerLock.lock();
        try {
            return SSLContext.sessionTicketKeyResume(context.ctx);
        } finally {
            readerLock.unlock();
        }
    }
846310
def _counter(self):
        """"""
        count = int(self._client.kv[self._counter_path])
        count += 1
        count_str = str(count).zfill(self._COUNTER_FILL)
        self._client.kv[self._counter_path] = count_str
        return count_str
91743
function getCustomer(client) {
  return client.commerce().customer().customerAccount().getAccounts({
    pageSize: 1
  }).then(pickFirst);
}
1113785
function countMinutes(redisClient,  keyPrepend, key, callback) {
    var multi = redisClient.multi();
    var currentTimeKey = getMinutesSinceEpoch();
    for (var i = currentTimeKey; i > currentTimeKey-MAX_KEYS; --i ) {
        multi.get(keyPrepend+"m:"+i+":"+key);
    }
    multi.exec(callback);
}
1031760
protected String grantServiceTicket(final String ticketGrantingTicket, final Service service, final AuthenticationResult authenticationResult) {
        val ticket = centralAuthenticationService.grantServiceTicket(ticketGrantingTicket, service, authenticationResult);

        LOGGER.debug("Generated service ticket [{}]", ticket.getId());
        return ticket.getId();
    }
1160592
def count(self, eventRegistry):
        
        self.setRequestedResult(RequestEventsInfo())
        res = eventRegistry.execQuery(self)
        if "error" in res:
            print(res["error"])
        count = res.get("events", {}).get("totalResults", 0)
        return count
84871
@Override
    public int getDiscardedResultsCount() {
        if (queryResults instanceof DiscardingBlockingQueue) {
            DiscardingBlockingQueue discardingBlockingQueue = (DiscardingBlockingQueue) queryResults;
            return discardingBlockingQueue.getDiscardedElementCount();
        } else {
            return -1;
        }
    }
469250
@Override
    public int countMissing() {
        int count = 0;
        for (int i = 0; i < size(); i++) {
            if (MISSING_VALUE == getKeyForIndex(i)) {
                count++;
            }
        }
        return count;
    }
914475
def ticket_metrics(self, ticket_id, **kwargs):
        ""
        api_path = "/api/v2/tickets/{ticket_id}/metrics.json"
        api_path = api_path.format(ticket_id=ticket_id)
        return self.call(api_path, **kwargs)
7810
def count(self, until=None):
        

        until = rationalize_until(until)
        return self.connection.zcount(self.scheduled_jobs_key, 0, until)
406127
def count(self):
        
        count = 0
        operation = self._get_operation()
        kwargs = self.kwargs.copy()
        kwargs['select'] = 'COUNT'
        limit = kwargs.get('limit', None)
        while True:
            result = operation(self.model.get_table_name(), **kwargs)
            count += result['Count']
            if limit is not None:
                limit -= result['Count']

            last_evaluated_key = result.get('LastEvaluatedKey', None)
            if not self._prepare_next_fetch(kwargs, last_evaluated_key, limit):
                break
        return count
536182
def _getValueCounts(mapping):
    
    return Counter({k: len(v) for k, v in viewitems(mapping)})
1283157
def view_tickets(self, id, **kwargs):
        ""
        api_path = "/api/v2/views/{id}/tickets.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
1292837
def get_jsapi_ticket(self):
        
        ticket_key = '{0}_jsapi_ticket'.format(self.appid)
        expires_at_key = '{0}_jsapi_ticket_expires_at'.format(self.appid)
        ticket = self.session.get(ticket_key)
        expires_at = self.session.get(expires_at_key, 0)
        if not ticket or expires_at < int(time.time()):
            jsapi_ticket_response = self.get_ticket('jsapi')
            ticket = jsapi_ticket_response['ticket']
            expires_at = int(time.time()) + int(jsapi_ticket_response['expires_in'])
            self.session.set(ticket_key, ticket)
            self.session.set(expires_at_key, expires_at)
        return ticket
1018619
String getSQLForSelectCount() {

        final DBTable dbTable = mModelClazz.getAnnotation(DBTable.class);
        final String dbTableName = dbTable.tableName();
        final List<DBColumn> primaryKeyList = getPrimaryKeyColumnList();
        final String preparedSql;
        if (primaryKeyList.size() > 0) {
            final DBColumn primaryKey = primaryKeyList.get(0);
            final String primaryKeyColumnName = primaryKey.columnName();

            preparedSql = "SELECT COUNT(" + primaryKeyColumnName + ") FROM " + dbTableName;
        } else {
            preparedSql = "SELECT COUNT(" + "*" + ") FROM " + dbTableName;
        }

        return preparedSql;
    }
521375
def most_visited_venues_card(num=10):
    
    if spectator_apps.is_enabled('events'):

        object_list = most_visited_venues(num=num)

        object_list = chartify(object_list, 'num_visits', cutoff=1)

        return {
            'card_title': 'Most visited venues',
            'score_attr': 'num_visits',
            'object_list': object_list,
        }
516465
public function getTicketCacheKey()
    {
        if (is_null($this->ticketCacheKey)) {
            return $this->ticketCachePrefix.$this->getAccessToken()->getFingerprint();
        }

        return $this->ticketCacheKey;
    }