adding counter cache