Add comment counter cache

This adds a counter cache for comments to libraries