api to get total and active posts for a course

@martynjames  @antoviaque added new api to get total and active threads by course.