The answer is: C
Explanation
The correct option is C: Only country C is exempt from this rule of custom because of its objection.
To explain, a rule of custom evolves from the general practice of states that is accepted as law (opinio juris). There must be evidence of substantial uniformity of practice by a substantial number of states. Where a new rule is created, acquiescence is assumed from actual agreement or lack of interest. However, if a state is a persistent objector to the new practice, it may either prevent the new practice from becoming a rule of custom or establish an exception to the new customary rule.
In this case, the practice of seeking permission from the harbour master before entering the harbours of countries A and B at night time has been followed by ships from all around the world for a number of years. This indicates a general and consistent practice by states. Moreover, countries A and B have agreed to this practice, which implies that they consider it as legally binding (opinio juris). Therefore, this practice may be regarded as an emerging rule of custom for all countries.
However, country C has objected to this practice, even though it has not sent any ships to countries A or B. This shows that country C is a persistent objector to the new practice and has a legal interest in challenging it. Therefore, country C may be exempt from this rule of custom because of its objection.
Country D, on the other hand, has abided by the rule over the years, which means that it has not objected to the new practice. Therefore, country D cannot claim an exemption from this rule of custom based on its objection. Country D may have other grounds to challenge the rule, such as inconsistency with treaty obligations or jus cogens norms, but that is not relevant for this question.
Hence, the most accurate statement is that only country C is exempt from this rule of custom because of its objection.