Fix #747: Create performance counters exposing arithmetic operations, also improving error reporting for performance counters.