Inclusion exclusion involving permutation

This issue is in the section of my textbook that deals with the inclusion-exclusion principle. I don't see how to apply it here. Any tips?

Determine the number of simple permutations of the nine digits 1,2,. . . ,9 in which blocks 12, 34, and 567 do not appear.

• Try counting instead the permutations where at least one of the blocks 12, 34, 567 do appear. To do so, it might be helpful to replace one or more of the blocks as a whole with a single letter. Nov 4, 2019 at 20:40

There are $$9!$$ permutations in all. If $$1,2$$ are adjacent, consider them as a block; then there are $$8!$$ permutations of the resulting objects ($$7$$ remaining numbers, one block). Likewise, if $$5,6,7$$ are adjacent, there are $$7!$$ permutations of the resulting objects ($$6$$ remaining numbers, one block). To count the permutations in which several of the patterns appear, join each of them into a block. The result is
$$9!-8!-8!-7!+7!+6!+6!-5!=283560\;.$$