Imagine a vector $\boldsymbol{v}$ composed of integers, and the set $S$ of all integer vectors within a hyper-rectange, with one corner at the origin and other at $\boldsymbol{m}$. In other words: $S = \{\boldsymbol{u} : m_i \gt u_i \ge 0 \} $. Alternately, you may think of $S$ as the Cartesian product of a multiple integer ranges $[0, m_i)$. At any rate, imagine the set of all dot products $P = \{\boldsymbol{v} \cdot \boldsymbol{u} : u \in S\}$. Given a specific $\boldsymbol{v}$ and $\boldsymbol{m}$, what can be said of the cardinality of $P$?
For example: if $\boldsymbol{v} = \{1, 1, 10\}$, and $\boldsymbol{m} = \{3,3,3\}$, $P = 6 * 3 = 18$. This is because the first two dimensions of $\boldsymbol{m}$ both project to overlapping regions, while the final dimension does not.
In general, I'm curious if there is a faster way to compute $|P|$ than brute force, particularly for low dimensions (say < 10), but potentially large values of $m$ such that the total number of elements in $S$ is very large. Also, any literature references would be great. I feel like this belongs to some subproblem of integer latices, but I can't seem to get the right keywords.