I am looking for the general expression for the number of ways to cover a set of $n$ elements into $p$ non-empty subsets sharing exactly $q$ elements (overlaps).
As an example, if $n=3$, one way to cover the set $[3]=\{1,2,3\}$ with $p=2$ subsets could be: $A_1=\{1,2\}$ and $A_2=\{2,3\}$, where there is $q=1$ overlap corresponding to the element $2$. The number of overlaps is counted as the number of times, elements (not necessarily distinct) are used more than once.
For example, in the case where $n=4$, $p=3$ and $q=2$ a possible covering of the set $[4]$ could be given by: $A_1=\{1,2\}$, $A_2=\{2,3\}$ and $A_3=\{3,4\}$.
In this case the subsets don't intersect $\cap^{3}_{i=1} A_i = \emptyset$, but the elements $2$ and $3$ are shared once each, hence counting for $q=2$ overlaps.
Therefore, there are some covering constraints:
The number of covers has to be less than the number of elements in $[n]$, i.e. $p \leq n$
The number of overlaps is bounded such that $0 \leq q \leq n(p-1)$, with $q=n(p-1)$ corresponding to $A_i = [n]$ for all $i \in \{1,\ldots,p\}$.
All elements of the initial set are used at least once, i.e. $\cup^{p}_{i=1} A_i = [n]$
No subset is empty, i.e. for all $i \in \{1,\ldots,p\}$, $A_i \neq \emptyset$
In the particular case where the subsets do not overlap i.e. $q=0$, this number is given by the Stirling number of the second kind $S(n,p)$.
What about the general case with a fixed number $q \geq 0$ of overlaps?
Thank you for your help.