The Metropolitan Police and its partners have foiled 40 terror attacks since 2017, said Chief Superintendent Kris Wright.