Returns number of DPs marked for removal
544406
def countRemovedDataProducts(self):
        """"""
        return len([item for item, dp in self.wdplv.getItemDPList() if dp.policy == "remove"])
1196220
int getNumStorageDirs(NameNodeDirType dirType) {
    if(dirType == null)
      return getNumStorageDirs();
    Iterator<StorageDirectory> it = dirIterator(dirType);
    int numDirs = 0;
    for(; it.hasNext(); it.next())
      numDirs++;
    return numDirs;
  }
134346
def get_all_plus_and_delete(self):
        
        res = {}
        props = list(self.plus.keys())  # we delete entries, so no for ... in ...
        for prop in props:
            res[prop] = self.get_plus_and_delete(prop)
        return res
829924
def getCountGT(self, item):
        """"""
        index = bisect.bisect_right(self._list, item)
        return len(self._list) - index
1028107
def _decr_remaining(self):
        
        assert self._remaining > 0
        self._remaining -= 1
        if not self._remaining:
            self._cdata = None
            return True
871223
def num_strips(self):
		

		num = self._libinput.libinput_device_tablet_pad_get_num_strips(
			self._handle)
		if num < 0:
			raise AttributeError('This device is not a tablet pad device')
		return num
834956
private function _deletedCount()
    {
        if ($this->_deleted === null) {
            return 0;
        }

        if (extension_loaded('bitset')) {
            return count(bitset_to_array($this->_deleted));
        } else {
            return count($this->_deleted);
        }
    }
511750
def filter_counter(self, counter, min=2, max=100000000):
        
        records_filterd = {}
        counter_all_records = 0
        for item in counter:
            counter_all_records += 1
            if max > counter[item] >= min:
                records_filterd[item] = counter[item]

        self.stat['user_record_events'] = counter_all_records
        self.stat['records_filtered'] = len(records_filterd)
        return records_filterd
617417
def delete(self, name):
    '''
    
    '''
    # TODO: confirm that this does not use the combo index and determine
    # performance implications.
    num_deleted = 0
    for interval,config in self._intervals.items():
      # TODO: use write preference settings if we have them
      num_deleted += self._client[interval].remove( {'name':name} )['n']
    return num_deleted
696414
def nupdated(self):
        """"""
        if not self._counters_calculated:
            self._counters_calculated = True
            self._extract_counters()

        return self._nupdated
136369
def _remove_from_ptr_size(self, ptr):
        # type: (path_table_record.PathTableRecord) -> int
        '''
        
        '''
        num_bytes_to_remove = 0
        for pvd in self.pvds:
            # The remove_from_ptr_size() returns True if the PVD no longer
            # needs the extra extents in the PTR that stored this directory.
            # We always remove 4 additional extents for that.
            if pvd.remove_from_ptr_size(path_table_record.PathTableRecord.record_length(ptr.len_di)):
                num_bytes_to_remove += 4 * self.pvd.logical_block_size()

        return num_bytes_to_remove
849770
def counters!
      the_counters = { processing: 0 }

      names = @lifecycle.states.keys
      results = RedisRds::Object.connection.multi do
        self.class::STATES_TERMINAL.each { |name| get_list(name).size }
        names.each { |name| get_list(name).size }
        @processing.getall
      end

      (self.class::STATES_TERMINAL + names).each do |name|
        the_counters[name] = results.shift.to_i
      end

      the_counters[:processing] = results.shift.reduce(0) { |sum, pair| sum + pair.last.to_i }

      return the_counters
    end
498376
def delete(self, count=1):
        
        if self.cursor_position < len(self.text):
            deleted = self.document.text_after_cursor[:count]
            self.text = self.text[:self.cursor_position] + \
                self.text[self.cursor_position + len(deleted):]
            return deleted
        else:
            return ''
712428
def get_num_names_owned( state_engine, checked_ops, sender ):
    
    
    count = 0
    registers = find_by_opcode( checked_ops, "NAME_REGISTRATION" )

    for reg in registers:
        if reg['sender'] == sender:
            count += 1

    count += len( state_engine.get_names_owned_by_sender( sender ) )
    log.debug("Sender '%s' owns %s names" % (sender, count))
    return count
351101
def op_count(cls, crawler, stage=None):
        """"""
        if stage:
            total_ops = conn.get(make_key(crawler, stage))
        else:
            total_ops = conn.get(make_key(crawler, "total_ops"))
        return unpack_int(total_ops)
73645
def _stripped(d):
    ''''''
    ret = {}
    for k, v in six.iteritems(d):
        if v:
            ret[k] = v
    return ret
619084
def deps_status(self):
        """"""
        if not self.deps:
            return [self.S_OK]

        return [d.status for d in self.deps]