code: private int countInterfaces(BeanMetaData bmd, boolean local) // F743-23167
      {
          // Note that these variables must be kept in sync with bindInterfaces.
          String homeInterfaceClassName = local ? bmd.localHomeInterfaceClassName : bmd.homeInterfaceClassName;
          boolean hasLocalBean = local && bmd.ivLocalBean;
          String[] businessInterfaceNames = local ? bmd.ivBusinessLocalInterfaceClassNames : bmd.ivBusinessRemoteInterfaceClassNames;
  
          int result = (homeInterfaceClassName == null ? 0 : 1) +
                       (hasLocalBean ? 1 : 0) +
                       (businessInterfaceNames == null ? 0 : businessInterfaceNames.length);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "countInterfaces: " + bmd.j2eeName + ", local=" + local + ", result=" + result);
          return result;
      }
docs: Determine the number of remote or local interfaces exposed by a bean.
  
  @param bmd the bean
  @param local <tt>true</tt> if local interfaces should be counted, or
  <tt>false</tt> if remote interfaces should be counted
  @return the number of remote or local interfaces