function countK(visibleDomain, indexDomain) {
    return visibleDomain.length/(indexDomain[indexDomain.length-1]-indexDomain[0]);
  }
Calculates the proportion of domain that is visible. Used to reduce the overall count by this factor
@param visibleDomain
@param indexDomain
@returns {number}