code: public static int getImplicitHydrogenCount(IAtomContainer container) {
          if (container == null) throw new IllegalArgumentException("null container provided");
          int count = 0;
          for (IAtom atom : container.atoms()) {
              Integer implicit = atom.getImplicitHydrogenCount();
              if (implicit != null) {
                  count += implicit;
              }
          }
          return count;
      }
docs: Counts the number of implicit hydrogens on the provided IAtomContainer.
  As this method will sum all implicit hydrogens on each atom it is
  important to ensure the atoms have already been perceived (and thus have
  an implicit hydrogen count) (see.
  {@link #percieveAtomTypesAndConfigureAtoms}).
  
  @param container the container to count the implicit hydrogens on
  @return the total number of implicit hydrogens
  @see org.openscience.cdk.interfaces.IAtom#getImplicitHydrogenCount()
  @see #percieveAtomTypesAndConfigureAtoms
  @throws IllegalArgumentException if the provided container was null