Catch a UnauthorizedAccessException when attempting to get the total amount of directories or files