Compute the size of intersections of sets
Python 3.8 (pre-release)

from math import comb
C=lambda n,k:comb(n,k) if n&gt;=0 and k&gt;=0 else 0
f=lambda n,v,x,y,z:C(n,v)*C(n-v,x-v)*C(n-x,y-v)*C(n-x-y+v,z-v)*4**(n-x-y-z+2*v)

Try it online!

We fill the Venn diagram's compartments one by one, and we multiply the numbers of options we have at each step:
C(v,n) - to fill the common intersection A∩B∩C, we need to choose v elements out of a total of n. After making that choice, we are left with n-v elements.
C(n-v,x-v) - we fill the x-v compartment from those n-v, and we're left with n-v-(x-v) = n-x elements
C(n-x,y-v) - we fill y-v, with n-x-y+v left
C(n-x-y+v,z-v) - we fill z-v
For each of the remaining n-x-y-z+2*v elements, there are four possibilities - either belong to exactly one of A, B, or C, or to none of them. Those choices are independent, so we multiply by 4**(n-x-y-z+2*v).