Issue #160: Improve SqlCountPlugin for left joins