code: func (r *Row) intersectionCount(other *Row) uint64 {
  	var n uint64
  
  	itr := newMergeSegmentIterator(r.segments, other.segments)
  	for s0, s1 := itr.next(); s0 != nil || s1 != nil; s0, s1 = itr.next() {
  		// Ignore non-overlapping segments.
  		if s0 == nil || s1 == nil {
  			continue
  		}
  
  		n += s0.IntersectionCount(s1)
  	}
  	return n
  }
docs: // intersectionCount returns the number of intersections between r and other.