Looking for the evaluation of the sum $$\sum_{a=1}^{p-1} \left\lfloor \frac{\left\lfloor{v/p}\right\rfloor+a}{q}\right\rfloor$$ where $p < q$, $p$ and $q$ are primes, and $v = (N \mod{p*q})$ where for integer $N \ge p * q$. Also $\left\lfloor{v/p}\right\rfloor \in \left\{{0, 1, 2, \ldots, q - 1}\right\}$.
A partial answer is I think $\left\lfloor{v/p}\right\rfloor$ plus some other terms. Now I have established that $$\sum_{a=1}^{q-1} \left\lfloor \frac{\left\lfloor{v/p}\right\rfloor+a}{q}\right\rfloor = \left\lfloor{v/p}\right\rfloor.$$
The primeness of $p$ and $q$ may not be required for the proof.