code: private static int countTrue(final boolean... b) {
          if (b == null) {
              return 0;
          }
          int count = 0;
          for (boolean bb : b) {
              if (bb) {
                  ++count;
              }
          }
          return count;
      }
docs: Count how many parameters are true.
  
  @return number of true values in parameter list.