Fixed HABTM's CollectionAssociation size

HABTM should not include new records as part of #count_records as new records are already counted.

This addresses #14914.
Merge pull request #14995 from fredwu/habtm_relation_size_calculation_fix-4-0-stable

Habtm relation size calculation fix for 4.0 branch