In fact we have $X(2n)=Y(2n)=(2n-1)!!^2$. You can count by building the permutation step by step. For a general permutation, there are $2n$ options for mapping the first element, $2n-1$ for mapping the second element, and so on, for a total of $(2n)!$ permutations.
For only even cycles, one option that would close a cycle is excluded for every other element: The first element can't be mapped to itself, so there are only $2n-1$ options for mapping it; whereas the second element (the element the first element was mapped to) can be mapped freely, yielding another factor $2n-1$; then, independent of whether the second element completed a cycle or not, the third element musn't be mapped to the one element that would complete a cycle (either the first or the third), so there are $2n-3$ options for mapping it, and then again $2n-3$ for mapping the fourth, and so on, for a total of $(2n-1)!!^2$.
For only odd cycles, you can either map the first element to itself ($1$ option), and then you have all $2n-1$ options for the second element, or you can map the first element to another element ($2n-1$ options), and then you can map that second element neither to itself, nor to the first element, leaving only $2n-2$ options, for a total of $1\cdot(2n-1)+(2n-1)(2n-2)=(2n-1)^2$. For all subsequent pairs of elements, before choosing those elements the current cycle is either of odd or of even (possibly zero) length, and correspondingly one of the two considerations applies, which both lead to the same number of possibilities for the pair of elements, so again the result is $(2n-1)!!^2$.