How many solutions to prime = $(d^2-2ad+b^2-2ab+2a^2)(d^2-2cd+2c^2-2bc+b^2)$? Let $a,b,c,d$ be integers $>-1$.
Let $p$ be a given prime. 
How to find the number of solutions to $p = (d^2-2ad+b^2-2ab+2a^2)(d^2-2cd+2c^2-2bc+b^2)$ ?
I assumed that this polynomial above does not have a constant factor. If it does however I wonder about the same polynomial divided by the constant factor.
Another question is ; let $w$ be a positive integer. Let $f(w)$ be the number of primes of type prime = $(d^2-2ad+b^2-2ab+2a^2)(d^2-2cd+2c^2-2bc+b^2)$ below $w$. How does the function $f(w)$ behave ? How fast does it grow ? Are those primes of type $A$ $mod$ $B$ for some integers $A$ and $B$ ? 
How to deal with this ?
Can this be solved without computing the class number ?
 A: First of all, you want to factor the terms in your product:
$$p = \left[(d-a)^2+(b-a)^2\right]\left[(d-c)^2+(b-c)^2\right].$$
Since $p$ is prime, we immediately get that one of these factors must be 1, and that $p\equiv 1\pmod 4$ if $p$ is odd.
We can assume WLOG that $c=b$ and $d=b\pm 1$. Then
$$p = (b-a\pm 1)^2 + (b-a)^2 = 2(b-a)^2 \pm 2(b-a)+1,$$
so if a prime is of your form, it is in fact odd, and the sum of two consecutive squares.
The distribution of primes of the form $2n^2+2n+1$, or even if there are infinitely many such primes, was still an open question as of 1962; I'm not aware of more recent results.
I'm afraid I don't understand what you mean by constant factors.
A: A given prime $p$ is either of the form $k^2+(k-1)^2$, or it isn't.  If not, then there are no solutions.  If so, then there is a solution $a=1, b=k, c=k, d=k+1$, and infinitely many more by adding a constant to each of $a,b,c,d$.
It's hopeless (in terms of what we can prove) to ask how many primes there are of the form $k^2 + (k-1)^2$ up to $w$: we don't even know that there are infinitely many.  However, it is a well-tested conjecture that any quadratic polynomial will produce $\displaystyle (C+o(1)) \frac{\sqrt{w}}{\log w}$ primes up to $w$, where $C$ is an explicit constant depending on the polynomial (for some polynomials, $C=0$ but not in this case).
Obviously primes of the form $k^2 + (k-1)^2$ are $1 \pmod 4$, but no other forced congruences exist (unless you are willing to exclude finitely many exceptions, in which case anything's possible).  This is because $p = 5, 13, 41$ all belong to this class.
