code: public int getFeatureCount(Set<L> labels, double threshold, boolean useMagnitude)
    {
      if (labels != null) {
        Set<Integer> iLabels = getLabelIndices(labels);
        return getFeatureCountLabelIndices(iLabels, threshold, useMagnitude);
      } else {
        return getFeatureCount(threshold, useMagnitude);
      }
    }
docs: Returns number of features with weight above a certain threshold
  @param labels Set of labels we care about when counting features
  Use null to get counts across all labels
  @param threshold  Threshold above which we will count the feature
  @param useMagnitude Whether the notion of "large" should ignore
  the sign of the feature weight.
  @return number of features satisfying the specified conditions