What are the average number of moves per game with regards to what opening has been played?
I wrote a simple PHP script which parses ELO codes and the corresponding number of moves from chess games in PGN files. This script will output the ELO code and number of moves into a CSV file. The averages can then easily be evaluated in Excel for example.
I ran my script on a PGN file with about 6000 games which I downloaded from The Week in Chess. You can view the result here:
If you want to evaluate millions of games, to get better averages, I suggest you use Pig script or some other scripting languages which can easily handle big chunks of data.
It's not about opening, it's about level of players in game. Beginner vs beginner game tends to have more moves on average, because they do not surrender easily. One forces second to mate him with his rook or something and it lasts forever. Games of serious players are mostly drawish, so let's say 20-40 moves on average. Of course, there are so many exceptions, long endgames etc, but they are rarely met in comparision to "fast" draws. It is really hard to give you exact answer on this. Try to ask more precisevely so we might figure out something
If you consider the ChessGames.com database, whose statistics are posted on http://www.chessgames.com/chessstats.html, that would be around 40 moves. I do not posses the program, but on ChessBase you may use any Mega Database, as pointed out on the thread What is the average length of a game of chess?, check it yourself: you can introduce the first moves of the opening you desire and look up the "median move value".