code: @Nonnegative
    public static int getDirectoryObjectCount (@Nonnull final File aDirectory)
    {
      ValueEnforcer.notNull (aDirectory, "Directory");
      ValueEnforcer.isTrue (aDirectory.isDirectory (), "Passed object is not a directory: " + aDirectory);
  
      int ret = 0;
      for (final File aChild : getDirectoryContent (aDirectory))
        if (!FilenameHelper.isSystemInternalDirectory (aChild.getName ()))
          ret++;
      return ret;
    }
docs: Returns the number of files and directories contained in the passed
  directory excluding the system internal directories.
  
  @param aDirectory
  The directory to check. May not be <code>null</code> and must be a
  directory.
  @return A non-negative number of objects in that directory.
  @see FilenameHelper#isSystemInternalDirectory(CharSequence)