The number of ways one can partition an $n$-element set into exactly $k$ subsets is described by the Stirling number of the second type.
Would someone suggest some references on the problem of a set partition problem with constraints as follows?
Partitioning an $n$-element set $S$ into exactly $k$ subsets, labeled as $c_1$ to $c_k$, with the constraint that some special elements $s \in S$ belong to only a subset $C^{\prime}$ of $\{c_1, ..., c_k\}$? How many ways are there? Note that those special elements and the set $C^{\prime}$ are given. Moreover, how about extending $C^{\prime}$ to multiple $C^{\prime}_i$?
For example, partitioning set $\{1, 2, 3, 4\}$ into two subsets named $A$ and $B$, with the constraints that elements $3$ and $4$ can only be in subset $B$. This dummy example is easy to solve. If we have multiple sets $C^{\prime}_i$, it becomes difficult. Any reference and hint are appreciated. Thanks.
Let's consider a version of the problem described in the Question which has multiple sets $C_i'$, each associated with a nonempty subset $B_i \subset S$ which must be covered by $C_i'$ and no other part of a partition of $S$.
In the Question $S = \{1,2,3,4\}$, $B = C' = \{3,4\}$. The Question says that "those special elements and the set $C'$ are given", but the wording of the example is perhaps open to a different interpretation.
If we assume that $C'$ must be used as one part of the partition, then we are reduced to considering how many ways $S\setminus C'$ can be partitioned (if nonempty). Adjoining $C'$ to those partitions would give exactly the partitions of $S$ that satisfy the proposed constraint. The Question further restricts us to partitions of $S\setminus C'$ with exactly $k-1$ parts (since we will use $C'$ as one part in the partition of $S$).
Introducing multiple sets $C_i'$, required to be used as parts that cover nonempty subsets $B_i \subset C_i'$, does not make the problem much more difficult, as long as these constraints are consistent. If all the sets $C_i'$ are pairwise disjoint, then counting feasible partitions reduces to counting partitions of $S\setminus \cup C_i'$ with the appropriate number of parts ($k$ minus the number of distinct $C_i'$ sets prescribed). The nonemptiness of a $B_i \subset S$ implies that each $C_i'$ must be used in a constrained partition of $S$. If some pair $C_i'$ and $C_j'$ have nonempty intersection but are not equal, then no constrained partition is possible!
Yet the Comment left by the OP says, "There is no special property of those subsets, for example, they can overlap or not."
There are few ways I can imagine to adjust the interpretation of the Question to allow for this. Perhaps the OP does not intend that the $C_i'$ actually be used as parts of a partition. The original statement in the Question is:
Here I have matched up "special elements" $s$ that should belong to "only a subset $C'$" into a corresponding $B \subset C'$. The generalization to several nonempty $B_i \subset C_i'$ then seems straightforward.
The reinterpretation that seems most worthy of consideration is that, despite the OP's Comment, "the subsets $C'$ are the inputs of the problem, which is pre-determined... they can overlap or not," it is only requiring the position $i$ of the part $c_i$ that is to contain some "special elements". At the least the wording of the "dummy example" seems to bear out this view, since the OP specifies $3$ and $4$ as special elements to belong to part $B$ of the partition, but does not otherwise specify what set $B \subset \{1,2,3,4\}$ is exactly.