code: private int getPiSystemsCount(IAtomContainer ac, IAtom atom) {
          List neighbours = ac.getConnectedAtomsList(atom);
          int picounter = 0;
          List bonds = null;
          for (int i = 0; i < neighbours.size(); i++) {
              IAtom neighbour = (IAtom) neighbours.get(i);
              bonds = ac.getConnectedBondsList(neighbour);
              for (int j = 0; j < bonds.size(); j++) {
                  IBond bond = (IBond) bonds.get(j);
                  if (bond.getOrder() != IBond.Order.SINGLE && !bond.getOther(neighbour).equals(atom)
                          && !neighbour.getSymbol().equals("P") && !neighbour.getSymbol().equals("S")) {
                      picounter += 1;
                  }/*
                    * else if (bonds[j].getOther(neighbours[i])!=atom &&
                    * !neighbours[i].getSymbol().equals("P") &&
                    * !neighbours[i].getSymbol().equals("S") &&
                    * bonds[j].getOther
                    * (neighbours[i]).getFlag(CDKConstants.ISAROMATIC)){ picounter
                    * += 1; }
                    */
              }
          }
          return picounter;
      }
docs: Gets the piSystemsCount attribute of the XLogPDescriptor object.
  
  @param  ac    Description of the Parameter
  @param  atom  Description of the Parameter
  @return       The piSystemsCount value