Add: CounterCache feature to hasMany models

as discussed in issue #1879 
@janmeier Yeah that's a good idea. Any ideas as to why this build isn't passing in postgres/MariaDB/postgres-native? I'm not really doing any database-specific things.