Set the number to be used in other method calls.

        Returns count.

        Set show to False to return '' instead.
519463
def num(self, count=None, show=None):  # (;$count,$show)
        
        if count is not None:
            try:
                self.persistent_count = int(count)
            except ValueError:
                raise BadNumValueError
            if (show is None) or show:
                return str(count)
        else:
            self.persistent_count = None
        return ""
1235874
def get_count(self, using):
        # TODO maybe can be removed soon
        
        obj = self.clone()
        obj.add_annotation(Count('pk'), alias='x_sf_count', is_summary=True)  # pylint: disable=no-member
        number = obj.get_aggregation(using, ['x_sf_count'])['x_sf_count']  # pylint: disable=no-member
        if number is None:
            number = 0
        return number
901830
def asnum(number, limit=None, return_format=None):
    
    uri = 'asnum/{number}'.format(number=number)
    if limit:
        uri = '/'.join([uri, str(limit)])
    return _get(uri, return_format)
187717
public void setCount(Integer count) {
        if (count == null)
            throw new RuntimeException("Cannot set count to null. Call removeCount() if you wanted to remove the bubble");

        if (countElem == null)
            createAndAttachCountElement();
        countElem.setInnerText(count.toString());
    }
427554
function calledWith() {
  var calledWithCount = 0;
  var args = [];
  var argsLength = arguments.length;
  for (var i = 0; i < argsLength; i++) {
    args[i] = arguments[i];
  }
  var callsLength = this._calls.length;
  CALLS: for (var i = 0; i < callsLength; i++) {
    var match = false;
    var called = this._calls[i];
    var calledLength = called.length;
    if (argsLength === 0 && calledLength === 0) {
      match = true;
    } else {
      ARGS: for (var a = 0; a < argsLength; a++) {
        match = matchArgs(args[a],called[a]);
        if (!match) {
          break ARGS;
        }
      }
    }
    if (match) {
      calledWithCount++;
    }
  }
  return calledWithCount;
}
192180
def count(self, value):
        

        if value is not None:
            assert type(value) is int, "'{0}' attribute: '{1}' type is not 'int'!".format(
                "count", value)
            assert value > 0, "'{0}' attribute: '{1}' need to be exactly positive!".format("count", value)
        self.__count = value
1224794
def ensure_number(num, *args, **kwargs):
    
    return num if isinstance(num, Number) else Number(num, *args, **kwargs)
1075350
def __set_method(self, value):
        '''
        
        '''
        if value not in [PAYMENT_METHOD_OTHER, PAYMENT_METHOD_CARD,
                         PAYMENT_METHOD_CHEQUE, PAYMENT_METHOD_CASH, ]:
            raise ValueError('Invalid amount value')

        self.__method = value
1331447
def set_value(self, value):
        
        check_call(_LIB.MXProfileSetCounter(self.handle, int(value)))
168196
def setRepCount(self, count):
        """"""
        self._rep_default_cache[0] = count
        self.ui.trackview.model().setRepCount(count)
969881
def repeat_call(func, retries, *args, **kwargs):
    '''
    
    '''
    retries = max(0, int(retries))
    try_num = 0
    while True:
        if try_num == retries:
            return func(*args, **kwargs)
        else:
            try:
                return func(*args, **kwargs)
            except Exception as e:
                if isinstance(e, KeyboardInterrupt):
                    raise e
                try_num += 1
996282
def count(self, count):
        
        if count is None:
            raise ValueError("Invalid value for `count`, must not be `None`")
        if count is not None and count < 0:
            raise ValueError("Invalid value for `count`, must be a value greater than or equal to `0`")

        self._count = count
572849
public final void setRedeliveredCount(int value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setRedeliveredCount", Integer.valueOf(value));
        getHdr2().setIntField(JsHdr2Access.REDELIVEREDCOUNT, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setRedeliveredCount");
    }
1044256
private int chooseRingNumber() {
        for (int i = 1; i < rnums.length; i++) {
            if (rnums[i] == 0) {
                rnums[i] = 1;
                return i;
            }
        }
        throw new IllegalStateException("No more ring numbers available!");
    }
655867
public function setNumber($value)
    {
        $name = $this->getName();
        $this->setCallerIdVariable('num', $value);
        $this->setCallerIdVariable('all', "$name<$value>");
    }
1005169
def set_total_count(self, value):
        """"""
        if not self.total_count_flag and value:
            self._count.append(int(value))
            self.total_count_flag = True
581537
def lrem(self, key, count, value):
        
        if not isinstance(count, int):
            raise TypeError("count argument must be int")
        return self.execute(b'LREM', key, count, value)