An exact quote would help; I find this interpretation confusing. The proceedure seems quite simple to me.
rmdir TESTD succeeds, then the two links
TESTD are removed. So the link count of the specified directory falls to 0. This can be verified by running a shell inside the directory and running
ls -ld after the directory has been unlinked (removed from its parent).
Once a file (such as a directory) has no links, and no running processes with a reference (file descriptor or current directory), it will be truly deleted.
Note that link count is irrelevant to whether
rmdir can succeed. Creating a file in the directory prevents it from being removed. But creating a file does not increase the link count of the directory. The test that stops
rmdir from succeeding is if "pathname contains entries other than . and .. ; or, pathname has .. as its final component." (
man 2 rmdir).