code: private int getHalogenCount(IAtomContainer ac, IAtom atom) {
          List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
          int acounter = 0;
          for (IAtom neighbour : neighbours) {
              if (neighbour.getSymbol().equals("F") || neighbour.getSymbol().equals("I")
                      || neighbour.getSymbol().equals("Cl") || neighbour.getSymbol().equals("Br")) {
                  acounter += 1;
              }
          }
          return acounter;
      }
docs: Gets the HalogenCount attribute of the XLogPDescriptor object.
  
  @param  ac    Description of the Parameter
  @param  atom  Description of the Parameter
  @return       The alogenCount value