fixes #6230 count self-merged contacts; improve how we get destination internal id
save migration script report to file