why not "return (int)$edits['edits'] + (int)$edits['deletes'] + (int)$edits['undeletes']" ?