How to get tab count in Chrome desktop without app/extension?

(Note: This answer was provided using Chrome version 45)

By navigating to chrome://inspect/#pages, one can view a list of all open pages (tabs):

Chrome DevTools — Pages, Chrome (desktop)

Each entry includes a link below it with the text "inspect". By performing a Find operation on the page (ctrl/cmd + F) for the string inspect, Chrome will produce the Find input box containing the total number of instances of the searched string, and, in this case, the total number of open pages/tabs in your browser!

Find input


While jsejcksn's answer led me in the right direction, it wasn't enough, since (on Chrome version 67) this page also contains embedded windows in pages, so the total count of inspect search results can be greater than the actual tab count.

The solution I found is the following:

  1. Go to chrome://inspect/#pages
  2. Run the following line of code in the javascript console:

    document.getElementById("pages-list").childElementCount
    

    The tabs count will be printed to the console.