Add config validation stats.

Fixes #5298