code: func (m *Memberlist) NumMembers() (alive int) {
  	m.nodeLock.RLock()
  	defer m.nodeLock.RUnlock()
  
  	for _, n := range m.nodes {
  		if n.State != stateDead {
  			alive++
  		}
  	}
  
  	return
  }
docs: // NumMembers returns the number of alive nodes currently known. Between
  // the time of calling this and calling Members, the number of alive nodes
  // may have changed, so this shouldn't be used to determine how many
  // members will be returned by Members.