I know this seems like a simple question, but I have discovered there is no simple way of getting comment count for a given disqus identifier in an ajax page.
I have looked at their API, and this is an option, but we are building an ajax cms-based website for end-users, and it would seem a bit tedious to force each user to have to create their own disqus application API and fill in public and secret keys just to get comments count. Besides, it seems overkill to load a separate remote JS, returning an entire JSON object, just to get the current page comments count.
There is a count.js script here, but there is no information about how to update count dynamically for ajax pages. Well almost ... after a lot of searching, I found some undocumented method DISQUSWIDGETS.getCount(). However, this stops working after one call for each identifier. Besides, this method also requires loading an external JS just to get comments count ...
Seems strange #comments amount cannot be extracted easier. The amount of comments is after all available after comments are displaying on the page, but we can't access that iframe with JS of course. Any enlightenments are appreciated ...
DISQUS.getCommentCounts()
was just too obvious for them to implement. – AJB