Get information about the counter

        .. note::
            GetCounterInfo sometimes crashes in the wrapper code. Fewer crashes
            if this is called after sampling data.
559173
def get_info(self):
        '''
        
        '''
        if not self.info:
            ci = win32pdh.GetCounterInfo(self.handle, 0)
            self.info = {
                'type': ci[0],
                'version': ci[1],
                'scale': ci[2],
                'default_scale': ci[3],
                'user_data': ci[4],
                'query_user_data': ci[5],
                'full_path': ci[6],
                'machine_name': ci[7][0],
                'object_name': ci[7][1],
                'instance_name': ci[7][2],
                'parent_instance': ci[7][3],
                'instance_index': ci[7][4],
                'counter_name': ci[7][5],
                'explain_text': ci[8]
            }
        return self.info
1220117
public int getCount (K key)
    {
        CountEntry<K> entry = _backing.get(key);
        return (entry == null) ? 0 : entry.count;
    }
391273
def __getNumberOfFollowers(self, web):
        
        counters = web.find_all('span', {'class': 'Counter'})
        try:
            if 'k' not in counters[2].text:
                self.followers = int(counters[2].text)
            else:
                follText = counters[2].text.replace(" ", "")
                follText = follText.replace("\n", "").replace("k", "")

                if follText and len(follText) > 1:
                    self.followers = int(follText.split(".")[0])*1000 + \
                        int(follText.split(".")[1]) * 100
                elif follText:
                    self.followers = int(follText.split(".")[0])*1000
        except IndexError as error:
            print("There was an error with the user " + self.name)
            print(error)
        except AttributeError as error:
            print("There was an error with the user " + self.name)
            print(error)
1046908
def count(self, page_size=10, vtimeout=10, callback=None):
        
        def counted(a):
            if callable(callback):
                callback(int(a['ApproximateNumberOfMessages']))
        self.get_attributes('ApproximateNumberOfMessages', callback=counted)
783247
def counter(name, desc)
      return @registry.counter(name, desc)
    rescue Prometheus::Client::Registry::AlreadyRegisteredError
      return @registry.get(name)
    end
92101
@VisibleForTesting
	protected Optional<CounterData> getCounterData(final String counterName)
	{
		Preconditions.checkNotNull(counterName);

		final Key<CounterData> counterKey = CounterData.key(counterName);
		final CounterData counterData = ObjectifyService.ofy().load().key(counterKey).now();

		return Optional.fromNullable(counterData);
	}
339331
def get_count(self, request, notifications, mark_as_read=False):
        
        return Response({'count': notifications.filter(is_read=False).count()})
120183
public Counters getCounters() throws IOException {
    ensureState(JobState.RUNNING);
    org.apache.hadoop.mapred.Counters ctrs = info.getCounters();
    if (ctrs == null) {
      return null;
    } else {
      return new Counters(ctrs);
    }
  }
386149
@Override
	public long getCount(long when){
		Long recWhen = when - (when % granularity);
		AtomicLong times = counters.get(recWhen);
		return times == null ? 0 : times.longValue(); 
	}
536182
def _getValueCounts(mapping):
    
    return Counter({k: len(v) for k, v in viewitems(mapping)})
573771
public PerfCounter get(String counter)
    {
        // Admited: could get a little race condition at the very beginning, but all that'll happen is that we'll lose a handful of tracking event, a loss far outweighed by overall reduced contention.
        if (!this.Counters.containsKey(counter))
            this.Counters.put(counter, new PerfCounter(false));
        return this.Counters.get(counter);
    }
1239775
def _parseCounters(self, data):
        
        info_dict = util.NestedDict()
        for line in data.splitlines():
            mobj = re.match('^\s*([\w\.]+)\s*=\s*(\S.*)$', line)
            if mobj:
                (key, value) = mobj.groups()
                klist = key.split('.')
                info_dict.set_nested(klist, parse_value(value))
        return info_dict
531620
def counter(self, counter_name, default=0):
    
    return self._state.counters_map.get(counter_name, default)
258317
def collect_num(self):
        
        element = self.soup.find("a", {
            "data-za-a": "click_answer_collected_count"
        })
        if element is None:
            return 0
        else:
            return int(element.get_text())
926148
public int getCount(T x, T y) {
        // REMINDER: check for indexing?
        return counts.get(getIndex(x, y));
    }
553337
def count(self):
        
        Statement = self.get_model('statement')

        session = self.Session()
        statement_count = session.query(Statement).count()
        session.close()
        return statement_count
337729
def rpc_get_num_names( self, **con_info ):
        
        db = get_db_state(self.working_dir)
        num_names = db.get_num_names()
        db.close()

        return self.success_response( {'count': num_names} )