How many photons can exist in a cubic box of unit volume, simultaneously? Suppose that we have a cubic box of unit volume. Simultaneously, how many photons can exist in such box? Is there any limit? 
 A: Photons are bosons so unlike fermions such as electrons there is no restriction on multiple photons occupying the same energy state. Consequently there is no limit on the number of photons you can put in your box.
There is an upper limit to the total energy density in the box since if you make it too high the box willcollapse into a black hole. However this limit is absurdly high and for most purposes can be ignored.
Note that individual photons can have arbitrarily low energies, so for any given energy density you can have an arbitrarily high photon number density simply by using photons of a low enough frequency.
Later:
Wood raises an interesting point in a comment. Suppose we have a cubical box of side $d$ then the largest wavelength/lowest frequency photon that it is possible to fit in the box has a wavelength of $2d$, so the energy of that photon is $h\nu = hc/2d$.
Let's take a black hole with a Schwarzschild radius of $d/2$ (we'll use this approximation since black holes aren't cubes) in which case the mass is:
$$ M = \frac{c^2r_s}{2G} \approx \frac{c^2d}{4G} $$
and the energy is just $E=Mc^2$ so:
$$ E \approx \frac{c^4d}{4G} $$
The number of photons is just this nergy divided by the photon energy we calculated above of $hc/2d$ so the number of photons in the box is (approximately):
$$ N \approx \frac{c^3d^2}{2Gh} $$
And there's your expression for the maximum number of photons you can get into your box before it turns into a black hole. For a $1$m box I make that about $3\times10^{68}$ photons.
A: You have to keep in mind that if we are not at absolute zero the atoms in the walls of the container will have thermal energy and therefore they will vibrate and emit/absorb photons. In an equilibrium situation, the electromegnetic radiation in the box will be blackbody radiation (assuming we are dealing with an isolated system). The expected number of photons will be in this case $N \propto V T^3$. Therefore, since volume is fixed, the answer will depend on the temperature of the box.
