diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index d07aaa3fbb8ccb02ae00d845649dc9c1d623cba5..68d3a4800f14fef5b5e7df9cd9afe3bc85358bed 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -8,6 +8,7 @@ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
 const lazy = {};
 
 ChromeUtils.defineESModuleGetters(lazy, {
+  gZenUIMigration: "resource:///modules/ZenUIMigration.sys.mjs",
   AboutHomeStartupCache: "resource:///modules/AboutHomeStartupCache.sys.mjs",
   AWToolbarButton: "resource:///modules/aboutwelcome/AWToolbarUtils.sys.mjs",
   ASRouter: "resource:///modules/asrouter/ASRouter.sys.mjs",
@@ -1458,7 +1459,7 @@ BrowserGlue.prototype = {
       windowcount++;
       let tabbrowser = win.gBrowser;
       if (tabbrowser) {
-        pagecount += tabbrowser.visibleTabs.length - tabbrowser.pinnedTabCount;
+        pagecount += tabbrowser.visibleTabs.filter(t => t.getAttribute("pending")!=="true").length;
       }
     }
 
@@ -1623,6 +1624,8 @@ BrowserGlue.prototype = {
     } else if (profileDataVersion < APP_DATA_VERSION) {
       lazy.ProfileDataUpgrader.upgrade(profileDataVersion, APP_DATA_VERSION);
     }
+
+    lazy.gZenUIMigration.init(this._isNewProfile);
   },
 
   async _showUpgradeDialog() {
