Add class method to the pagecount model