make counter_cache optional if needed

Hi, This is a minor thing , but very inconvenient when run into.

here's the patch:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2499

Could someone have a look and review or correct me if I am wrong? Thanks,

K.