code: private int getHydrogenCount(IAtomContainer ac, IAtom atom) {
          List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
          int hcounter = 0;
          for (IAtom neighbour : neighbours) {
              if (neighbour.getSymbol().equals("H")) {
                  hcounter += 1;
              }
          }
          return hcounter;
      }
docs: Gets the hydrogenCount attribute of the XLogPDescriptor object.
  
  @param  ac    Description of the Parameter
  @param  atom  Description of the Parameter
  @return       The hydrogenCount value