Use inheritance chain instead of callbacks to increment counter caches after create
Use inheritance chain instead of callbacks to increment counter caches after destroy
Set _after_create_counter_called flag to make update counter cache work
Restore the destroy_by_association check in post destroy counter cache
Hide BelongsToAssociation#increment_counters and #decrement_counters
Merge pull request #14765 from byroot/refactor-counter-cache-create-and-destroy

Refactor counter cache create and destroy