class Connection: needless functions removed; count replaced with sum for debugging purpose.