We compute the dimension dn,r(q)=dim(\IRqr) of the defining module \IRqr for the q-partition algebra. This module comes from r-iterations of Harish-Chandra restriction and induction on \GLn(\FFq). This dimension is a polynomial in q that specializes as dn,r(1)=nr and dn,r(0)=B(r), the rth Bell number. We compute dn,r(q) in two ways. The first is purely combinatorial. We show that dn,r(q)=∑λfλ(q)mrλ, where fλ(q) is the q-hook number and mrλ is the number of r-vacillating tableaux. Using a Schensted bijection, we write this as a sum over integer sequences which, when q-counted by inverse major index, gives dn,r(q). The second way is algebraic. We find a basis of \IRqr that is indexed by n-restricted q-set partitions of {1,...,r}, and we show that there are dn,r(q) of these.