finished implementing counts collecting from result object