Fixed total count computation on adding concurrently modified histograms

When adding histograms, the total count should be computed by accumulation of the counts at each index rather than read from the "from" histogram, as the latter could lead to a higher total count in case of concurrent modifications, causing ArrayIndexOutOfBoundsExceptions during iterations.