var bucket = arr[i] % k;
seems to be out of question so I assume "%" and "[]" operators are ok for you.
count += counts[(k - bucket) % k];
The new Thing here is
+=
. You can write the above also as
count = count + counts[(k - bucket) % k];
counts[bucket]++;
Here I assume "++" is not clear. It means simply increment the value by one. You can write this also this like
counts[bucket]= counts[bucket] + 1;
I hope I could help with this.