This add-on adds a discussions count field to the xf_user table and handles additions and deductions from the count when needed.
There is a built in option which allows the user to exclude selected forums from the counting process, this works exactly like the message count and is based on the XenForo option when creating/editing forums.
Discussion count can be shown in message user info by ticking the discussion count checkbox in style properties:
Admin CP -> Style Properties ->Message Elements
Once this add-on is installed you should rebuild the users cache on your site and all users discussion counts will be updated by going to:
Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches