Per https://phabricator.wikimedia.org/T380361
On line 1124 https://phabricator.wikimedia.org/source/phabricator/browse/wmf%252Fstable/src//applications/transactions/storage/PhabricatorApplicationTransaction.php$1124 the total number (parameter number 2 of the line 1121) adds parameters count($add) (parameter number 3 of the line 1121) and count($rem) (parameter number 5 of the line 1121) but forgets parameter count($mod) (parameter number 7 of the line 1121).
Using Phorge's repo this is https://we.phorge.it/source/phorge/browse/master/src//applications/transactions/storage/PhabricatorApplicationTransaction.php$1121