Counter only per table not per database

rf
Testfix

rf
Merge pull request #65 from fischey/master

foreign key per table: name reproducable