How many numbers less than four digits (from 0 to 9999) are not divisible by 3, 5, or 7?
We define A as the set of numbers divisible by 3, B as the set of numbers divisible by 5, and $C$ as the set of numbers divisible by 7.

The result requested is $10000-|A \cup B \cup C|$. It only remains to apply the inclusion-exclusion formula, noting that $A \cap B$ is the set of numbers divisible by 15, etc. If we don't make any mistakes, we end up with 4571.