Add active record's counter_cache support