I'm having trouble understanding one step of Stein and Shakarchi's proof that the exterior measure of a rectangle is equal to its volume. The proof I reference is part of Example 4 in section 1.2 of the Real Analysis book.
To summarize the proof, first they show $|R| \leq m_*(E)$. To show the reverse inequality, the book divides $\mathbb{R}^d$ into cubes of side length $1/k$. Then, it considers the sets $\mathcal{Q}$ and $\mathcal{Q}'$.
The claim is that if $\mathcal{Q}$ consists of the finite collection of all cubes entirely contained in rectangle $R$ and $\mathcal{Q}'$ the finite collection of all cubes that intersect the complement of $R$, then there are $O(k^{d-1})$ cubes in $\mathcal{Q}'$, where $O$ denotes standard Big-Oh notation.
From here, using the volumes of the cubes, the text uses:
$$ \sum_{Q \in (\mathcal{Q} \cup \mathcal{Q}')} |Q| \leq |R| + O(1/k) $$
to complete the proof.
Question: Why are there $O(k^{d-1})$ cubes in $\mathcal{Q}'$? I interpret $\mathcal{Q}'$ to be the set of all cubes in the complement, i.e. $\mathcal{Q} \cup \mathcal{Q}' = \mathbb{R}^d$. If this is the case, then I believe $\mathcal{Q}'$ is not a finite collection of cubes and a Big-Oh approximation of its size doesn't make sense.