Refactor counting of windows with IndexedWindowName, and IndexedIconName