diff --git a/public/api/contributions.php b/public/api/contributions.php
index 0e737c4..3b02068 100644
--- a/public/api/contributions.php
+++ b/public/api/contributions.php
@@ -664,6 +664,14 @@ function handle_delete_comment($input) {
$stmt = $pdo->prepare("DELETE FROM comments WHERE comment_id = :id");
$stmt->execute([':id' => $input['comment_id']]);
+ $stmt2 = $pdo->prepare("
+ UPDATE contributions
+ SET comment_count = comment_count - 1
+ WHERE contribution_id = :cid;
+ ");
+
+ $stmt2->execute([':cid' => $input['contribution_id']]);
+
json_response(['message' => 'Comment deleted successfully.']);
} catch (PDOException $e) {
diff --git a/public/js/app.js b/public/js/app.js
index 5b2c2e4..d1fbde9 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -1105,6 +1105,14 @@ function loadComments(contributionId) {
});
listContainer.innerHTML = html;
+
+ const count = response.comments.length;
+ const header = document.querySelector('#comments-toggle-' + contributionId)?.closest('.popup-comments-header');
+ if (header) {
+ header.innerHTML = ' Kommentare (' + count + ')' +
+ ' ';
+ }
+
});
}