code: func (m *metadataTracker) countsPtr(dev protocol.DeviceID, flags uint32) *Counts {
  	// must be called with the mutex held
  
  	key := metaKey{dev, flags}
  	idx, ok := m.indexes[key]
  	if !ok {
  		idx = len(m.counts.Counts)
  		m.counts.Counts = append(m.counts.Counts, Counts{DeviceID: dev[:], LocalFlags: flags})
  		m.indexes[key] = idx
  	}
  	return &m.counts.Counts[idx]
  }
docs: // countsPtr returns a pointer to the corresponding Counts struct, if
  // necessary allocating one in the process