Corrected data type for local_counts to be the same as counts.