I am looking to track many in-game events, e.g. the score of each move, how many moves are taken, what types of moves, etc. A lot of stats can simply be tracked with a counter. In some cases I need to aggregate data in order to calculate the value (e.g. most common move). How are you tracking in-game stats for your games? How do you avoid creating a class with tens or hundreds of fields? How do you avoid littering the code with tracking invocations? How do you abstract the aggregate data so as to avoid rewriting it for each scenario?
The way I usually end up doing it is to first use a messaging system. Let's say that you send a message each time the player fires his weapon. Then, the weapon system (or the weapon object) acts on that message when it is received and the weapon is fired. If you then want to keep stats of when a weapon is fired, simply log the weapon.fire messages to a list somewhere. Then it would be easy to go from that list and generate statistics from that.
You could consider introducing an object that has the sole responsibility for tracking game stats. It could simply listen to all the relevant messages, and append them to their respective lists