code: protected int getFeatureCountLabelIndices(Set<Integer> iLabels, double threshold, boolean useMagnitude)
    {
      int n = 0;
      for (int feat = 0; feat < weights.length; feat++) {
        for (int labIndex:iLabels) {
          double thisWeight = (useMagnitude)? Math.abs(weights[feat][labIndex]):weights[feat][labIndex];
          if (thisWeight > threshold) {
            n++;
          }
        }
      }
      return n;
    }
docs: Returns number of features with weight above a certain threshold
  @param iLabels Set of label indices 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