update the counter for the number of cached items also when fetching from a remote peer

also enforce not fetching the same object multiple times by using a flag
(this is not really necessary because serialization should be ensured by the
 arc implementation, but it's safer to use a flag in case the caching backend
 would change)
properly count the number of cached items + cleanings

also more granularity since now we keep track of the number of items in each list