It seems that the counting of elements in $S_i$ can be made in the same way as the counting of those in $S$.
For simplicity, I rename $y=r$, $z=\hat b$.
Let $T=\{k<a\}\setminus S$. Then it is easy to see that
$$
S=\left\{k<a\colon \left\{k\cdot \frac{py}{px}\right\}+\left\{k\cdot \frac{z}{pr}\right\}
=1+\left\{k\cdot \frac{py+z}{px}\right\}\right\}
$$
and
$$
T=\left\{k<a\colon \left\{k\cdot \frac{py}{px}\right\}+\left\{k\cdot \frac{z}{pr}\right\}
=\left\{k\cdot \frac{py+z}{px}\right\}\right\}.
$$
Thus,
$$
|S|=\sum_{k<a}\left\{k\cdot \frac{py}{px}\right\}
+\sum_{k<a}\left\{k\cdot \frac{z}{px}\right\}
-\sum_{k<a}\left\{k\cdot \frac{py+z}{px}\right\}.
$$
Similarly,
$$
|S_i|=\Sigma_i(py)+\Sigma_i(z)-\Sigma_i(py+z),
\qquad \text{where}\quad
\Sigma_i(d)=\sum_{k<a,k\equiv i\pmod p}\left\{k\cdot \frac{d}{px}\right\}.
\qquad(*)
$$
Now let $d$ be any integer. Set $\mu=\gcd(d,x)$, $d'=d/\mu$, $x'=x/\mu$ and choose $j<p$ with $id'\equiv j\pmod p$. When $k$ runs over the numbers congruent to $i$ modulo $p$, the residue of $kd'=id'+(k-i)d'$ modulo $px'$ runs over all the numbers of the form $j+p\ell$ with $\ell<x'$. Then we have
\begin{align*}
\Sigma_i(d)&=\sum_{k<a,k\equiv i\pmod p}\left\{\frac{kd'}{px'}\right\}
=\mu\sum_{\ell=0}^{x'-1}\frac{j+p\ell}{px'}
=\frac{\mu j}p+\mu\cdot\frac{x'-1}2=\frac{\mu j}p+\frac{x-\mu}2.
\qquad (**)
\end{align*}
Return to $(*)$. Using $\gcd(py+z,x)=\gcd(z,x)=1$ and $iz\equiv i(py+z)\pmod p$, from $(**)$ we get $\Sigma_i(py+z)=\Sigma_i(z)$. Thus from $(*)$ and $(**)$ we obtain
\begin{align*}
|S_i|=\Sigma_i(py)
=\frac{x-\gcd(py,x)}2,
\end{align*}
as required.