I had the similar requirement as in thread http://lithosphere.lithium.com/t5/developers-discussion/Freemarker-Pagination/td-p/57090 and I have got the pagination working as per this comment and what i am doing is as below:
I have set the itemPerPage = 6 and I had to change the admin setting(from backend) in Discussion Styles > Post and Topics > Topics Display > Topics per page to 6 also so that the pagination appears correctly.
Issues: The pagination always shows upto 3 pages, irrespective of what I set at the admin end, it is becuase of the user prefrences(which of-course overrides the admin settings for the particular logged in user) in the My Settings, when I changed the Topics per page from the users My Setting to 6, than it worked fine and displayed the proper pagination.
I have deduced that the pagination is build around the Users My Settings(In case user is logged in) but the list of topics which are being displayed on my Forums Page is as per my variable defined in the Custom Component. So is there any way i can override the users topic page per setting and display my pagination flawlessely.