For any fixed d≥1 and subset X of Nd, let rX(n) be the maximum cardinality of a subset A of {1,…,n}d which does not contain a subset of the form b+rX for r>0 and b∈Rd. Such a set A is said to be \emph{X-free}. The Multidimensional Szemerédi Theorem of Furstenberg and Katznelson states that rX(n)=o(nd). We show that, for ∣X∣≥3 and infinitely many n∈N, the number of X-free subsets of {1,…,n}d is at most 2O(rX(n)). The proof involves using a known multidimensional extension of Behrend's construction to obtain a supersaturation theorem for copies of X in dense subsets of [n]d for infinitely many values of n and then applying the powerful hypergraph container lemma. Our result generalizes work of Balogh, Liu, and Sharifzadeh on k-AP-free sets and Kim on corner-free sets.