Get count of total pages

def page_count(self):
        """
        Get count of total pages
        """
        postcount = self.post_set.count()
        max_pages = (postcount / get_paginate_by())
        if postcount % get_paginate_by() != 0:
            max_pages += 1
        return max_pages