diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go
index 84c3864669..32cfc2adff 100644
--- a/routers/web/repo/branch.go
+++ b/routers/web/repo/branch.go
@@ -217,7 +217,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) {
 		branches = append(branches, deletedBranches...)
 	}
 
-	return branches, totalNumOfBranches - 1
+	return branches, totalNumOfBranches
 }
 
 func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch,