Taking the absolute value works just fine in this case but I wanted to assure you that it is not just a matter of convenience. One can write the appropriate general equation using the inclusion/exclusion principle (inclusion/exclusion principle wiki) just as Daniel Lichtblau described. For whatever it's worth below is more of a step-by-step use of that principle for a "less numerous" example than the original question.
(* Determine the number of permutations of length n with up to d digits that contain all d digits. *)
(* Set values that only require a few steps *)
d = 4;
n = 8;
(* Total number of permutations *)
s0 = d^n
(* Now subtract off the number of permutations that leave off one number and use just the remaining number of digits. There are d = Binomial[d,1] possible digits to remove and (d-1)^n permutations of the remaining d-1 digits. Those permutations consist of the remaining d-1 digits. *)
s1 = s0 - Binomial[d, 1] (d - 1)^n
(* We've now subtracted off too many times the number of permutations that had two digits left off. There are Binomial[d,2] possible pairs of digits to leave off and (d-2)^n permutations of the remaining digits. So add those back in. *)
s2 = s1 + Binomial[d, 2] (d - 2)^n
(* We've now add added in too many times the number of permutations that had three digits left off. There are Binomial[d,3] possible triplets of digits and there are (d-3)^n permutations of the remaining digits. So subtract those out. *)
s3 = s2 - Binomial[d, 3] (d - 3)^n
(* We are now done for this example after considering removing up to 3 digits because we only had 4 digits to start with as all permutations have to have at least one digit represented. *)
(* If we did this in general, we see that because Binomial[d,j] == Binomial[d,d-j], the answer is any of the equivalent forms below... *)
d^n + Sum[Binomial[d, j] (d - j)^n (-1)^j, {j,d - 1}] (* Direct from the steps above *)
Sum[Binomial[d, j] (d - j)^n (-1)^j, {j, 0, d - 1}]
Sum[Binomial[d, j] j^n (-1)^(d - j), {j, d}]
(-1)^d*Sum[(-1)^j*Binomial[d, j]*j^n, {j, d}]
Abs[Sum[(-1)^j*Binomial[d, j]*j^n, {j, d}]]