Performance monitor counters: Interplay between safety and security in complex cyber-physical systems