Let's start by giving names to the unknown quantities
$$
\begin{bmatrix}
4 & a & 1 & e \\
3 & b & 2 & f \\
c & 3 & g & 2 \\
d & 4 & h & 1
\end{bmatrix}
$$
and call the total sum of the rows and columns $T$. We can now subtract the 1st row from the 2nd column as follows
$$(a+b+3+4)-(4+a+1+e)=T-T=0$$
$$|| \quad\quad\quad\quad\quad\quad$$
$$\quad\quad\quad\ \ \ b-e+2 \quad\quad\Rightarrow\quad\quad e=b+2$$
That column and row both contained $a$. This trick works whenever you choose a row and column that contain the same variable. When we do the same trick for the other variables, we get 3 more equalities for 4 total:
$$e=b+2 \quad\quad f=a+2 \quad\quad g=d+2 \quad\quad h=c+2$$
Substituting these into the square we get
$$
\begin{bmatrix}
4 & a & 1 & b+2 \\
3 & b & 2 & a+2 \\
c & 3 & d+2 & 2 \\
d & 4 & c+2 & 1
\end{bmatrix}
$$
Most importantly, for some particular choice of $a,b,c,$ and $d$ this magic square is valid exactly when
$$a+b=c+d$$
So if you're counting how many valid magic squares of this form are possible, there are $\bf{infinitely\ many}$. For example, choose $a=7$, $b=8$, $c=9$, $d=6$ and a magic square pops out
$$
\begin{bmatrix}
4 & 7 & 1 & 10 \\
3 & 8 & 2 & 9 \\
9 & 3 & 8 & 2 \\
6 & 4 & 11 & 1
\end{bmatrix}
$$
If however you wanted to know, for some particular choice of $a,b,c$, and $d$, how many distinct squares can be made by rotations and reflections, then the answer is $\textbf{8}$. This is because there are 4 rotations and their corresponding reflections. (Note: a reflection of a reflection creates either the original square, or a rotation of the original square)
$\quad$ And finally if you wanted to also count exchanging rows and columns as part of "building" new squares, then their are two choices of $a,b,c$, and $d$ that affect the answer. Specifically
$$(1)\quad\quad a=1 \quad b=2 \quad c=1 \quad d=2 \quad\quad\quad$$
$$(2)\quad\quad a=2 \quad b=1 \quad c=2 \quad d=1 \quad\quad\quad$$
With either of these two choices, two of the columns will be equal. (It's impossible for two rows to ever be equal, so we don't need to worry about that).
In conclusion, for most choices of $a,b,c,$ and $d$ are $8\cdot 4! \cdot 4! = 4608$ distinct squares.
Except when the choice of $a,b,c,$ and $d$ is $(1)$ or $(2)$, in which case there are $8 \cdot \frac{4!}{2} \cdot 4! = 2304$ distinct squares.
Best Answer
Note that if you add both rows and both columns together, you should get a sum of $15+15+15+15=60$, but this counts the numbers in the yellow squares twice. On the other hand, if you count all the squares individually you get $1+2+\cdots+9=45$. Therefore the sum of the yellow squares must be $15$.
However, this implies that there is no solution unless you are allowed to repeat numbers. The reason is this: consider the two yellow squares in the same row. We know that they, along with the third yellow square, sum to $15$. However, their row also must sum to $15$. So the blue square between them must have the same number as the third yellow square.