added getnumberofpostsintopic functionality to topicdao