added counter cache to tasks and work records