Fixes #63: fix_counts does not work when using primary_key, if counted records table uses primary_key