How to calculate molarity and the number of molecules for a mixture in a simulation box?
I would use a slightly different approach than andselisk, based on the volume on your box, and that I don't think you can neglect the volume of your ammonia molecules. Given $V(\text{sol}) = \pu{17.576E-27 m3}$ and $c(\ce{NH3}) = \pu{15.0E3 mol  m-3}$ we can calculate the number of ammonia molecules we need:
\begin{align}
  &amp;&amp; c(\ce{NH3}) &amp;= \frac{n(\ce{NH3})}{V(\text{sol})};\\
  &amp;&amp; n(\ce{NH3}) &amp;= \frac{N(\ce{NH3})}{N_\mathrm{A}};\\
&amp;\to&amp;
     c(\ce{NH3}) &amp;= \frac{N(\ce{NH3})}{N_\mathrm{A}\cdot V(\text{sol})}\\
&amp;\Longleftrightarrow&amp;
     N(\ce{NH3}) &amp;= c(\ce{NH3})\cdot N_\mathrm{A}\cdot V(\text{sol}) \approx 159
\end{align}

Since you want to limit the number of molecules to $512$, we know that all other molecules have to be water:
$$N(\ce{H2O}) = 512 - N(\ce{Gly}) - N(\ce{NH3}) = 352$$

Lastly, let's check whether the density is anywhere close to what we would expect, we take $M_\mathrm{m}(\ce{Gly}) = \pu{75 u}$, $M_\mathrm{m}(\ce{H2O}) = \pu{18 u}$, and $M_\mathrm{m}(\ce{NH3})= \pu{17 u}$.
\begin{align}
  \rho(\text{sol}) &amp;= \frac{m(\text{sol})}{V(\text{sol})}\\
  &amp;= \frac{\left(
       N(\ce{Gly})M_\mathrm{m}(\ce{Gly}) 
     + N(\ce{H2O})M_\mathrm{m}(\ce{H2O})
     + N(\ce{NH3})M_\mathrm{m}(\ce{NH3})\right)\frac{m_\mathrm{u}}{\pu{u}}
     }{V(\text{sol})}\\
  \rho(\text{sol}) &amp;\approx \pu{861 kg m-3} = \pu{0.861 g cm-3}
\end{align}

Citing Wikipedia's entry of ammonia I would say you are quite close:


  Solvent properties
  Ammonia is miscible with water. [...] The maximum concentration of ammonia in water (a saturated solution) has a density of $\pu{0.880 g cm-3}$ and is often known as '.880 ammonia'. [...]


The Handbook of Chemistry and Physics has a concentration table (91st Edition p. 8-53; currently 98th Edition, also online), and I'll reproduce a couple of values for comparison, at $\pu{20 ^\circ C}$.

\begin{array}{rrr}
  \text{Mass\%} &amp; c / \pu{mol L-1} &amp; \rho / \pu{g cm-3}\\\hline
    5.0   &amp;   2.868    &amp;   0.9770\\
    9.0   &amp;   5.080    &amp;   0.9613\\
   12.0   &amp;   6.695    &amp;   0.9502\\
   18.0   &amp;   9.823    &amp;   0.9294\\
   24.0   &amp;  12.826    &amp;   0.9102\\
   28.0   &amp;  14.764    &amp;   0.8920\\\hline
\end{array}

In conclusion, you are a few water molecules short, or your box is slightly too large, or your solution is not dense enough. I would expect some trade-offs when doing such a study and keeping the named constraints, so I guess you should have a close look at everything and settle for the optimum you can afford.