Statistics

Statistics are a game feature that allows players to track how many times they have completed certain tasks.

List of general statistics
The statistics window is divided into three sections: General, Blocks and Items. The General screen shows a multitude of generic statistics which are listed in the table below. The Blocks screen shows the number of times different blocks have been crafted, used (placed) and mined. The Items screen shows the number of times different items have been depleted, crafted and used to destroy blocks. The buttons at the top of the Blocks and Items screens can be used to sort the list.

Storage
Statistics are stored in .minecraft/saves/world name/stats/username.json (world name/stats/username.json on servers). They keep track of these stats, as well as achievements earned. The file structure is JSON based, it looks like this:

{"stat.xxxxxx":value,"stat.xxxxxx":value,"stat.xxxxxx":value,...}

Statistics are stored in the stats-change section. All of these fields are empty unless they need updating. For example, until you jump, the number of times you've jumped will not be recorded. Distance is stored in centimeters, and time is stored in ticks (where one tick equals 0.052 seconds). An example entry for Games Quit:

{"stat.leaveGame":4}

History
Notch talked about statistics (along with achievements) on his March 18 2011 blog post:

Saving of stats online was considered for the Beta 1.6 update, but was considered too error prone at that point.

Trivia

 * The statistics ignore metadata. As such, all types of wood, wool, saplings, and dye will be counted as the same item. Coal and charcoal are also treated as the same.
 * As such, on the items tab, there is no tooltip on ink sac. This is because ink sac has the damage value (0) of the dye ID.
 * Firing an arrow from a bow does not count as using it.
 * "Times Crafted" includes smelting, such as smelting wood for charcoal.
 * The compass and clock icons are functional.
 * When cocoa pod is viewed in the statistics list their full texture is shown, this includes the top of the pod as-well as the side.