The 4.0.19 import counts fewer changes as contributions (per your comments in another thread,
many automatic changes are now discounted). When upgrading from 4.0.18 to 4.0.19, the contributions were counted using a higher number of changes as contributions, because automatic changes had not been discounted.
Regarding you having a lower number of contributions in 4.0.18 => 4.0.19, I believe this was because the 5000 number I gave you for a manual edit to the upgrade script was too high to count properly and was also not applied correctly. This resulted in many records being skipped (the build 002 upgrade uses 2000 which works correctly). It was a test run anyway so I didn't re-run the counters; I only solved the infinite looping problem. This would all result in the post-upgrade numbers from that attempt being lower than expected for a 4.0.18 import.
According to the post referred to above, 4.0.19's importer now does NOT count the following as contributions:
- Automatic edits related to "converted link" formats (neither did 4.0.18)
- Automatically generated categories from found category tags
- Automatically generated attachments
The latter two would explain why many users' counts are lower.
If SUM(vw_usercount.vw_contribs) - SUM(vw_usercount.vw_redirects) is less than the number of rows in the vw_revision table, and SUM(vw_usercount.vw_redirects) is no more than the number of rows in the vw_redirect table, then there probably is not a bug.
Some side notes:
In the future, I believe that non-automatic attachments should not be counted as contributions anymore, unless there was a change to the attachment description. The user already receives credit to their vw_uploads count. Likewise, with non-automatic categories, when the user creates them in the Add Categories of another editor, this should not be counted anymore; as there is no description added, the increase to the vw_categorizes count is sufficient credit. In this vein, it is probably also time to stop counting synonyms as contributions (this probably affects your numbers significantly as well); this behavior was kept because they were technically edits in VW3. Maybe we can make changes like this in 4.1 or 4.2.