Refactor db into db.connect, db.onConnection
Add tag counts to index view