code: private static int nStereoBonds(List<IBond> bonds) {
          int count = 0;
          for (IBond bond : bonds) {
              IBond.Stereo stereo = bond.getStereo();
              switch (stereo) {
              // query bonds... no configuration possible
                  case E_OR_Z:
                  case UP_OR_DOWN:
                  case UP_OR_DOWN_INVERTED:
                      return -1;
                  case UP:
                  case DOWN:
                  case UP_INVERTED:
                  case DOWN_INVERTED:
                      count++;
                      break;
              }
          }
          return count;
      }
docs: access the number of stereo bonds in the provided bond list.
  
  @param bonds input list
  @return number of UP/DOWN bonds in the list, -1 if a query bond was
  found