counter-cache now accepts a foreignKey lookup function