Better exception when performance counter instance name limit is reached

Fixes #2352
is the cast required in  `(int)SByte.MaxValue` ?