The divisors of 400 are given by the prime factorization:
\[
400 = 2^4 \times 5^2
\]
The number of divisors of 400 is given by \((4+1)(2+1) = 15\). The divisors are:
1, 2, 4, 5, 8, 10, 16, 20, 25, 40, 50, 80, 100, 200, 400.
Similarly, the divisors of 1000 are:
\[
1000 = 2^3 \times 5^3
\]
The number of divisors of 1000 is \((3+1)(3+1) = 16\). The divisors are:
1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 125, 200, 250, 500, 1000.
Now, to find the divisors common to both 400 and 1000, we calculate the greatest common divisor (gcd) of 400 and 1000.
\[
\gcd(400, 1000) = 2^3 \times 5^2 = 200
\]
The divisors of 200 (the gcd) are the common divisors of 400 and 1000. The divisors of 200 are:
1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 200.
Thus, the number of common divisors, \( n(X \cap Y) \), is 12.