Well, a closed binary operation is nothing more than a function $f:A \times A \to A$. In this context it's obvious what the total number of operations is
$$|A|^{|A \times A|} = 5^{25}$$
Where I've use abs value bars to denote cardinality. The general strategy in this situation should be to use the information we're given to realize that actually the values of $f$ are determined by it's values on only a subset.
The condition "$x$ is the identity" is one of the easiest cases. This simply fixes the values $f$ when any argument is $x$ and does nothing otherwise. Thus operations $f$ with $x$ as the identity are in the obvious bijection with functions $g: \{a,b,c,d\} \times \{a,b,c,d\} \to A$ (if it's not obvious, just take $f(s,t) = g(s,t)$ for any $s,t \in \{a,b,c,d\}$
Now we consider commutativity. Before going to the specific condition from your problem, consider the question of how many operations in general are commutative. We have $5^{25}$ total operations, but a commutative operation has the property $f(s,t) = f(t,s)$ for $t,s$ in $A$. I assume you've seen the idea of writing down the table for a binary operation. In these terms, a commutative operation gives a table symmetric about the diagonal. So it's value is determined entirely once you've written all the values on and below the diagonal. For this case, of a 5-element set, the lower triangle has $15$ elements. So there should be $5^{15}$ commutative operations.
I won't go through the argument for how to find the number of commutative operations with $x$ as identity in total detail. But note that for example the identity law $f(x,a) =f(a,x) = a$ already specifies that $f$ is commutative for any pair of elements containing $x$. So you just have to check how many of the $g$ from before are commutative.
Finally, for the number of total operations that have identity, our first guess should be that it's just five times the number of operations with a given identity (a la the first question), as we jsut sum over all possible choices of identity. But we need to check that identities are unique, so that we don't double count, I leave that to you.