Taking your example, the simple fact of subtracting 4 combinations (that have ascending numbers) from the total will imply that the rest of the combinations are not in ascending order.

There are 24 combinations, 4 of which contain ascending numbers.

Removing 4 will leave the

__number__ of combinations that don't contain ascending numbers.

In your problem, 10C4 is the number of combinations with ascending numbers.

Another 10C4 is the number of combinations with descending numbers.

So, twice that, and subtracted from the total (ie 5040) will give those that contain numbers neither in ascending nor descending.

If you want to do it the long way, you can try this:

0 1 2 ? (7 possibilities)

0 1 3 ? (6 more possibilities, for a total of 6+7 possibilities)

0 1 4 ?

0 1 5 ?

.

0 1 8 ? (1 more possibility)

0 2 3 ? (6 more possibilities)

0 2 4 ? (5 more possibilities)

.

.

1 2 3 ? (6 more possibilities)

.

.

6 7 8 ? (1 possibility)

Total should be =

$\displaystyle 1(7+6+5+4+3+2+1)+2(6+5+4+3+2+1)+3(5+4+3+2+1)+...+6 (2+1)+7(1) $

$\displaystyle = 1(\dfrac{(7)(8)}{2}) + 2(\dfrac{(6)(7)}{2}) + ... + 7(\dfrac{(1)(2)}{2})$

Which is quite long to count