The **Added** part of this answer contains a proof that there are $2^{2^\kappa}$ ultrafilters on $\kappa$ and hence that $|\beta D|=2^{2^\kappa}$ if $D$ is the discrete space of cardinality $\kappa$. (It wouldn’t surprise me if the construction that you mention in the question is actually a disguised form of the same idea, or at least something similar.)