I say! *monocle pops out* Congratulations to the winners and well done to all.
Below are things I thought about:
1) Play it safe and take the average (arithmetic population mean or mu, lol). Statistically guaranteed a good outcome, provided you post towards the end and there is sufficient number of replies. The more the better, really.
2) Random number - it worked very well for some, but is very much blind chance.
3) Take an object whose width is a known factor or easy to estimate: telly, stand or those headphones, for example. Use it to measure the total length of the shelf, divide by spine width of a standard case and you are done, just don't forget to multiply by the number of shelves at the end. This was my approach, but I estimated by eye and got it wrong on both counts. Hence my later thought.
4) Open the image in Photoshop, apply transform filters to ensure straight angles and proper orientation. Drag a ruler out and bingo!
5) Or you could use the telly to measure the total wall space, take away empty space and divide up the remainder into DVD cases. Too much room for error, though.