Find the number of distinct integral solutions of $x^{4} + 2x^{3} + 3x^{2} - x + 1 \equiv 0 \pmod{30}$ where $0 \leq x < 30$.

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