This is taken from Pollard, A User's Guide to Measure Theoretic Probability problem 1.1.
Let $A_1, A_N$ be events in some probability space. Denote $\cap_{i \in J}A_i$ as $A_J$ for some set $J \subseteq [N]$. Also, denote the sum of the probabilities of the ways that $k$ events occur together as $S_k = \sum_{|J| = k}\mathbb P \{A_J\}$.
Show that the probability of exactly $m$ of the events $A_i$ occurring is given by:
$${m\choose m}S_m - {m+1\choose m} S_{m+1} ... +(-1)^{N-m} {N \choose m} S_N$$
What I've tried
I know that this is a generalization of the inclusion-exclusion rule which gives us the probability that none of the events occur. The inclusion-exclusion rule is easier to derive since it's clear what each term is adding and subtracting. Here I don't have strong intuition on what each of the terms represent.
The binomial coefficients remind me of the stars and bars result: the number of ways to distribute $m$ points into $k$ groups. So the first coefficient is the number of ways to distribute $m$ points into $1$ group, the second is the number of ways to distribute $m$ points into $2$ groups and so on until $N - m +1$ groups. This doesn't seem to be the right interpretation since it does not match up with the $S_k$ terms.
Any hints or intuition would be appreciated.