Let set $T = \{1, 2, 3, 4, 5, 6, 7, 8\}$. Find the number of all nonempty subsets $A$ of $T$ such that $3 \mid S(A)$ and $5 \nmid S(A)$, where $S(A)$ is the sum of all the elements in $A$.

Let's think step by step and output the final answer within \boxed{}.
user