I've been given the above task, and I was quite surprised about how easy it seemed.
My solution
$$N = \binom{2n+1}{0} + \binom{2n+1}{1} + \ldots + \binom{2n+1}{n} = \sum_{i = 0}^{n} \binom{2n+1}{i}$$
Basically, you count how many subsets you can form with exactly zero elements, with one element, etc., all the way to the amount of subsets with exactly $n$ elements.
The question
Sums are one thing of course. But the fact that the task was asked not for sets $X$ of any size, but for ones with exactly $2n + 1$ elements makes me wonder whether there is a more elegant solution to this problem.
Is there, and if yes, how do you find it?
For every subset $A\subseteq X$ list $A$ if $|A|\leq n$ and list $A^{\complement}$ otherwise.
Then we have a list of $2^{2n+1}$ subsets.
All sets that have cardinality $\leq n$ are on that list and every set on it is listed twice.
So there are $\frac12\cdot2^{2n+1}=2^{2n} $ subsets with cardinality $\leq n$.