My Approach:
okay my first approach to this problem was calculating all the sets of quadruples and then subtracting it with the ones that would not fit, this worked for the first a sub-question but later when I checked it was wrong for the example. I found a lot of programming answers for this but none of them without them so please help me out.

(a): Let $x_1$ be the number of $1$s used and $x_2$ the number of $2$s. The total number of addends is $4$, while the sum is $6$, therefore:
$$\begin{cases} x_1+x_2=4 \\ x_1+2x_2=6 \end{cases} $$
which has only one solution: $x_2=2$ and $x_1=2$. There are ${5 \choose 2}$ ways to choose two $1$s from $S$ and ${4 \choose 2}$ ways to choose two $2$s from $S$. Then the number of solutions is:
$${5 \choose 2}{4 \choose 2}=60$$
(b): Let $x_1$ be the number of $1$s used, $x_2$ the number of $2$s and $x_3$ the number of $3$s. The total number of addends is $4$, while the sum is $9$, therefore:
$$\begin{cases} x_1+x_2+x_3=4 \\ x_1+2x_2+3x_3=9 \end{cases} $$
If we subtract the first equation from the second, we get $x_2=5-2x_3$, therefore $x_2$ is odd and then $x_2=1$ or $x_2=3$, then
(b.1): $x_2=1$, the system reduces to:
$$\begin{cases} x_1+x_3=3 \\ x_1+3x_3=7 \end{cases} $$
and then $x_3=2$ and $x_1=1$, with a total number of choosing $x_1$ $1$s, $x_2$ $2$s, $x_3$ $3$s equal to:
$${4 \choose 1}{3 \choose 1}{2 \choose 2} = 12$$
(b.2): $x_2=3$, the system reduces to:
$$\begin{cases} x_1+x_3=1 \\ x_1+3x_3=3 \end{cases} $$
and then $x_3=1$ and $x_1=0$, with a total number of choosing $x_2$ $2$s, $x_3$ $3$s equal to:
$${3 \choose 3}{2 \choose 1} = 2$$
If you like, you can write that as ${4 \choose 0}{3 \choose 3}{2 \choose 1}$.
Finally, we sum the two cases (b.1) and (b.2) to get $12+2=14$.
(c) is left to you.