The bugzilla table-of-bug-counts was reported as Bug 92676. An example screen is available, but not connected to a database. To make it work with your installation, get print_bug_count_table.pl and table_of_bug_counts.cgi from the bug above. Remove the trailing underscore on the CGI. Link to them from your static pages.
Bug 193177 is similar but graphs bug counts versus time. Please see the new screenshots and here. The patch merely contains the two new scripts, and linking to them is an exercise for the installer.
We had an accident where someone restored some mysql databases from tar archive without restarting the mysql daemon. This put our database updates to disk in a deleted file for a week. To correct the problem for our (old) v2.10 installation, we used to sync with the shadow directory.