code: public static int getBondCount(IChemFile file) {
          int count = 0;
          for (int i = 0; i < file.getChemSequenceCount(); i++) {
              count += ChemSequenceManipulator.getBondCount(file.getChemSequence(i));
          }
          return count;
      }
docs: Get the total number of bonds inside an IChemFile.
  
  @param file       The IChemFile object.
  @return           The number of Bond object inside.