About.com on Rails' Association Options - :counter_cache
A review/tutorial by About.com on Rails' :counter_cache Association option.\r\nAlso describes that :counter_cache only updates on after_create and after_destroy:\r\n\"It's also important to understand exactly when ActiveRecord runs the above statements as you may need to modify your code to avoid unexpected results. The column is incremented using the life-cycle method after_create and decremented using before_destroy. The parent id must be set at these points for the counter to work correctly.\"\r\n\"Decrementing the counter can only be done by destroying the child object so you can see how this would typically be used with the :dependent => :destroy option. Obviously, counter caching doesn't make sense for child objects that can exist apart from the parent.\"