upgrade has_count and has_many_comments to new AR4 syntax.
upgrade more things to rails 4.