How many integers $n$ with $0 \leq n < 840$ are there such that $840$ divides $n^8-n^4+n-1$? Provide your answer as an integer.

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