Window numbers are incorrect in daemon mode
Hi,
When I using emacsclient -a "" -nw to start Emacs as daemon, the window numbers are incorrect while switching window. It happens on GNU Emacs 26.1/27.0.50 with Ubuntu/Mint Linux/macOS.
Only two windows, but the numbers are 2 and 3 in the screenshot below.

BTW, the numbers are correct in ace-window and winum.
I have tested in windows, seem to have no problem, please test by bare emacs, maybe it is a configure problem.
It exists in the terminal on Linux and macOS. On Windows, there is not real daemon mode actually.
Here are the minimal steps which reproduce it for me. I'm running Windows 7 with Emacs 26.1.
I have switch-window installed. I have renamed my init.el so that it is not loaded.
- In
cmd.exe, I runemacsclientw.exe -n -c -a "" - In the default
*scratch*buffer, I execute(require 'switch-window) - I create several splits,
C-x 2 C-x 3 - I try switching windows with
C-x o
This produces the following:

Pressing a has no effect.
Here's a workaround when using the switch-window-qwerty-shortcuts. I imagine this can be extended to other shortcut setups.
It seems that the first shortcut is being lost somewhere. So, just throw a dummy one in there.
(setq switch-window-qwerty-shortcuts '("x" "a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "i" "o")
My full setup is as follows:
(use-package switch-window
:ensure t
:bind
;; default C-x o is other-window
;; default C-x C-o is delete-blank-lines
(("C-x o" . switch-window)
("C-x C-o" . switch-window))
:config
(setq switch-window-multiple-frames t)
(setq switch-window-shortcut-style 'qwerty)
(setq switch-window-qwerty-shortcuts '("x" "a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "i" "o"))
(setq switch-window-increase 3))
I notice that the labeling of windows depends on the monitor the frame is on. I have 4 monitors. Say that I have 3 frames open with 4 windows total. I can have a frame on the far left monitor and it will be labeled "a". When I move that same frame to the far right monitor, it becomes ";". It skips several of the qwerty shortcuts:
(setq switch-window-qwerty-shortcuts '("a" "s" "d" "f" "j" "k" "l" ";" "w" "e" "r" "u" "i" "o" "q" "t" "y" "p"))