Store in temp key and count if countOnly is true