code: private int countNonNegativeBits(final Tristate[] bits) {
      int result = 0;
      for (final Tristate bit : bits)
        if (bit != Tristate.FALSE)
          result++;
      return result;
    }
docs: Counts the number of non-negative bits of a given tristate vector.
  @param bits the tristate vector
  @return the number of non-negative bits