A function from a set $A$ to a set $B$ is a subset of $A\times B$ satisfying certain conditions, one of which is that its domain is $A$. If either $A$ or $B$ is empty, $A\times B=\varnothing$, and $\varnothing$ is therefore the only subset of $A\times B$. If $A\ne\varnothing$, $\varnothing$ is not a function with domain $A$, so you’re quite right about $(a)$: there are no such functions. If $A=\varnothing$, though, it’s a different story. The domain of the function $\varnothing$ is $\{a:\langle a,b\rangle\in\varnothing\}$, which is ... ?
As noted in the comments, it suffices to count the number of partitions
of $X$ in nonempty parts. The number of partitions of a set $X$ of cardinality
$n$ in $k$ nonempty parts is denoted $\left\lbrace\begin{matrix} n \\ k \end{matrix}\right\rbrace$. Those numbers are called Stirling numbers of the second kind. Up to relabeling, a partition of $X$ into $k$ nonempty parts is the same thing as a surjection
$X \to \lbrace 1,2,\ldots ,k\rbrace$. Since there are $k!$ such relabelings,
the number of such surjections is $k!\left\lbrace\begin{matrix} n \\ k \end{matrix}\right\rbrace$.
Let $[k]$ denote the inetger interval $\lbrace 1,2,\ldots ,k\rbrace$, $F(X,k)$ denote the set of all maps $X \to [k]$, and for a given set $A$, denote by $S(X,A)$ the set of all surjections $X \to A$. So
$|S(X,A)|=|A|!\left\lbrace\begin{matrix} n \\ |A| \end{matrix}\right\rbrace$, and $F(X,k)$
is obviously partitioned by all the $S(X,A)$ for $A\subseteq [k]$. Since there are $\binom{k}{r}$ subsets of cardinality $r$ in $[k]$, we see that
$$
k^n=|F(X,k)|=\sum_{r=0}^k \binom{k}{r} r! \left\lbrace\begin{matrix} n \\ r\end{matrix}\right\rbrace =
\sum_{r=0}^k \frac{k!}{(k-r)!} \left\lbrace\begin{matrix} n \\ r\end{matrix}\right\rbrace=
k! \left\lbrace\begin{matrix} n \\ k\end{matrix}\right\rbrace+ \sum_{r=1}^{k-1} \frac{k!}{(k-r)!} \left\lbrace\begin{matrix} n \\ r\end{matrix}\right\rbrace
$$
and hence
$$
\left\lbrace\begin{matrix} n \\ k \end{matrix}\right\rbrace=
\frac{k^n}{k!}-\sum_{r=1}^{k-1} \frac{\left\lbrace\begin{matrix} n \\ r\end{matrix}\right\rbrace}{(k-r)!}
$$
Starting from the obvious $\left\lbrace\begin{matrix} n \\ 1 \end{matrix}\right\rbrace=1$,
we deduce successively that
$$
\begin{array}{lclcl}
\left\lbrace\begin{matrix} n \\ 2 \end{matrix}\right\rbrace &=&
\frac{2^n}{2!}-
\frac{\left\lbrace\begin{matrix} n \\ 1\end{matrix}\right\rbrace}{1!} &=&
2^{n-1}-1 \\
\left\lbrace\begin{matrix} n \\ 3 \end{matrix}\right\rbrace &=&
\frac{3^n}{6!}-
\frac{\left\lbrace\begin{matrix} n \\ 1\end{matrix}\right\rbrace}{2!}-
\frac{\left\lbrace\begin{matrix} n \\ 2\end{matrix}\right\rbrace}{1!} &=&
\frac{3^{n-1}-1}{2}-(2^{n-1}-1) \\
\end{array}
$$
In your example $n=4$ and hence
$$
\left\lbrace\begin{matrix} 4 \\ 1\end{matrix}\right\rbrace=1, \
\left\lbrace\begin{matrix} 4 \\ 2\end{matrix}\right\rbrace=2^{4-1}-1=7, \
\left\lbrace\begin{matrix} 4 \\ 3\end{matrix}\right\rbrace=\frac{3^{4-1}-1}{2}-(2^{4-1}-1)=6, \
\left\lbrace\begin{matrix} 4 \\ 4\end{matrix}\right\rbrace= 1
$$
So the total number of partitions you’re looking for is $1+7+6+1=15$.
Best Answer
For the sake of having an answer, yes your solution as well as your justifications are correct.