Physics diffraction gratingsWatch
The maximum value for theta at which maxima can be produced is 90 degrees, as you can't have maxima be behind you, only to the right and left.
Plugging that into the above, we have n = d/wavelength where n is the maximum order observed. Calculate n and round it down to the integer below it, as you cant have a fraction of a maximum (so n must be a whole number).
The number of orders observed then is simply 2n + 1 (you have n orders each side of the centre so it must be multiplied by 2, and then you must add on the central 0th order maximum).