client: use Counter to calculate stats collectly

We should not uniquefy each elements in the lists.

Change-Id: I70e5e0719c247c638a59fb6d7343658581d520cc
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-py/+/1664193
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: 098ad59e700b9f0701cd71a6a5c07a45b58ecb62
diff --git a/run_isolated.py b/run_isolated.py
index e2cd52c..cc3001b 100755
--- a/run_isolated.py
+++ b/run_isolated.py
@@ -507,11 +507,12 @@
       cache=cache,
       outdir=outdir,
       use_symlinks=use_symlinks)
+  hot = (collections.Counter(cache.used) -
+         collections.Counter(cache.added)).elements()
   return bundle, {
     'duration': time.time() - start,
     'items_cold': base64.b64encode(large.pack(sorted(cache.added))),
-    'items_hot': base64.b64encode(
-        large.pack(sorted(set(cache.used) - set(cache.added)))),
+    'items_hot': base64.b64encode(large.pack(sorted(hot))),
   }