diff --git a/login_security.module b/login_security.module
index f762986..b1aaeec 100644
--- a/login_security.module
+++ b/login_security.module
@@ -303,13 +303,17 @@ function _login_security_remove_events($name = NULL, $host = NULL) {
  * @param int $time
  *   if specified, events up to this timestamp will be deleted. If not
  *   specified, all elements up to current timestamp will be deleted.
+ *
+ * @return int
+ *   The number of events deleted.
  */
 function _login_security_remove_all_events($time = NULL) {
   // Remove selected events.
   if (empty($time)) {
     $time = REQUEST_TIME;
   }
-  $result = db_delete('login_security_track')
+
+  return db_delete('login_security_track')
   ->condition('timestamp', $time, '<')
   ->execute();
 }
diff --git a/src/Form/LoginSecurityAdminSettings.php b/src/Form/LoginSecurityAdminSettings.php
index f235e48..1f78249 100644
--- a/src/Form/LoginSecurityAdminSettings.php
+++ b/src/Form/LoginSecurityAdminSettings.php
@@ -270,8 +270,8 @@ class LoginSecurityAdminSettings extends ConfigFormBase {
    *   An associative array containing the current state of the form.
    */
   public function clean_tracked_events(array &$form, FormStateInterface $form_state) {
-    _login_security_remove_all_events();
-    drupal_set_message($this->t('Login Security event track list is now empty.'));
+    $count = _login_security_remove_all_events();
+    drupal_set_message($this->t('Login Security event track list is now empty. @count item(s) deleted.', array('@count' => $count)));
   }
 
   /**
