>>12037750 (PB)
Try this
$(document).ready(function () {
// iterate each post in the thread, adding an overall post count#
var updatePostCount = function () {
$('span.threadCount').empty();
$('span.posts_by_id').each(function (i, v) {
var $count = $('<span class="threadCount" style="font-weight:bold">(#' + (i + 1) + ')</span>')
$(v).after($count);
});
};
// Make it go
updatePostCount();
// allow to work with auto-reload.js, etc.
$(document).on('new_post', function (e, post) {
updatePostCount();
});
});