Alice and Bob each have a coin. A coin can be flipped to give heads or tails with probability $p_{A,h}$ and $p_{A,t}$, respectively for Alice and $p_{B,h}$ and $p_{B,t}$ for Bob. We have $p_{A,h}=1-p_{A,t}$ and similarly for Bob. Alice flips her coin $a$ times and Bob flips his coin $b$ times. How many ways can at least one head be obtained across both Alice and Bob's experiments?
The easy answer is to count the ways that a head is not generated over both Alice and Bob's flips. This is $(1-p_{A,h})^a\times (1-p_{B,h})^b$, and then take one minus this.
However, I am interested in counting all of the ways, given $a$ and $b$ that do lead to at least one head during the flips. For instance, if $a=b=1$, then, both could land on heads, $p_{A,h}p_{B,h}$, or only one could land on heads, $p_{A,h}p_{B,t}$ or $p_{A,t}p_{B,h}$. We then have
$$ 1 - p_{A,t}p_{B,t}=p_{A,h}p_{B,h} + p_{A,h}p_{B,t}+p_{A,t}p_{B,h} $$
How can I generalise this for arbitrary $a$ and $b$?