added absolute import in database.attrs module
support Python 2.6 by using a 2.6-compatible Counter code if it cannot be imported