Principal Ideal Domains with Many Primes of Index 2 By the index of a prime $p$ in a principal ideal domain $R$, I mean the number of cosets of the ideal $(p)$ in $R$ (i.e. $\vert R/(p)\vert$). 

If I am given a positive integer $m$, I am wondering if it is always possible to find a PID that has exactly $m$ nonassociated primes of index $2$. 

For example, $\mathbb{Z}$ has one prime of index $2$ (namely, the integer $2$), while $\mathbb{Z}\left[\frac{1+\sqrt{-7}}{2}\right]$ has two nonassociated primes of index $2$ (namely, $\frac{1+\sqrt{-7}}{2}$ and $\frac{1-\sqrt{-7}}{2}$). If it is not always possible to find such a PID for any $m$, what are the values of $m$ for which I can get such a PID?  
 A: What you call the "index" of a prime $P$ is, in the context of number fields, usually called the norm.
If $F/\mathbf{Q}$ is a number field of degree $n$, and the prime $2$ splits completely in $F$, then there will be exactly $n$ primes of norm $2$ in the ring of integers $\mathcal{O}_F$. 
There are several ways to generate number fields in which $2$ splits completely. One method is to take the polynomial $(x-1)(x-2)(x-3)(x-4) \ldots (x-n)$ and deform it $2$-adically. By Krasner's lemma, $2$ will split completely in any such extension. If you want to be really explicit and write down an irreducible polynomial such that $2$ splits completely, you can take
$$(x-3)(x-6)(x-9) \ldots (x-3n) + 3 \cdot 2^{k}$$
for some $k \gg 1$. Here $k$ can be any integer big enough that Hensel's lemma works.
An alternative, take the cyclotomic field $K = \mathbf{Q}(\zeta_N)$, it has Galois group $G = (\mathbf{Z}/N \mathbf{Z})^{\times}$. Let $H = \langle 2  \rangle \subset G$, and let $F$ be the fixed field of $H$. Then $F/\mathbf{Q}$ is Galois with Galois group $G/H$, and $2$ will split completely. If one takes $N$ to be divisible by at least two primes $\equiv 1 \mod n$, then (because $H$ is cyclic) this will guarantee that $G/H$ has order divisible by $n$. So there will be a smaller abelian field $E$  of degree exactly $n$ in which two splits completely.
It's not easy to find such fields in which $\mathcal{O}_F$ is a PID, however. Indeed, we do not currently know whether there are even infinitely many fields with this property (although this is certainly conjectured, even for real quadratic fields). On the other hand, for any number field $F$, there exists (many choices of) integers $S$ such that the $S$-integers $\mathcal{O}_F[1/S]$ will be a PID. One can simply invert any set $S$ containing prime ideals which generate the class group. It's also not so hard to see that one can take $S$ to be prime to any fixed ideal, and so prime to $2$. The resulting rings $\mathcal{O}_F[1/S]$ will be PIDs with exactly $n$ primes of norm $2$.
In particular:
 For any integer $n$, there will exist number fields $F$ of degree $n$ and integers $S$ such that $\mathcal{O}_F[1/S]$ is a PID and has exactly $n$ primes of norm $2$. 
Example: If $K$ is the field $\mathbf{Q}[x]/((x-1)(x-2)(x-3) + 8)$,
then $\mathcal{O}_K$ is a PID, and $2$ splits completely. The ring of integers of $K$ is
$$\mathcal{O}_K = \mathbf{Z} \left[1,x, \frac{x^2 - x}{2} \right].$$
The prime ideals of norm $2$ are
$$P = \left(\frac{x^2 - 3 x}{2} \right), \quad Q = \left(\frac{x^2 - x}{2} \right),
\quad R = (x).$$
 Example If $K$ is the field generated by $x^2 +  x + 6$, then $2$ splits completely. However, the class group has order three. There are two primes
$$P = (2,x),  \quad Q = (2,x+1),$$
where (of course) $x^2 + x + 6 = 0$ so $x = (-1 + \sqrt{-23})/2$. These primes are not principal. However, if you invert any prime which splits in $K$ but does not split principally, then the corresponding ring becomes a PID. For example, if one inverts $3$, then $\mathcal{O}_K[1/3]$ is a PID. In this latter ring, one finds that
$$P = (x)\mathcal{O}_F[1/3], \quad Q = (x+1) \mathcal{O}_F[1/3],$$
Note that $PQ = (x^2+x) = (-6) = (2)$ in $\mathcal{O}_F[1/3]$.
