store counted relations in static var