src/common.[ch]: Add `counter_diff', a function to calculate the difference of two...