The number-theoretic codes are a class of codes defined by single or multiple congruences and are mainly used for correcting insertion and deletion errors. Since the number-theoretic codes are generally non-linear, the analysis method for such codes is not established enough. The distance enumerator of a code is a unary polynomial whose $i$th coefficient gives the number of the pairs of codewords with distance $i$. The distance enumerator gives the maximum likelihood decoding error probability of the code. This paper presents an identity of the distance enumerators for the number-theoretic codes. Moreover, as an example, we derive the Hamming distance enumerator for the Varshamov-Tenengolts (VT) codes.