def count_entries(self, subject):
    catalog = getToolByName(self.context, 'portal_catalog')
    brains = catalog(object_provides=IBlogEntry.__identifier__, Subject=subject.encode('utf-8'))
    return len(brains)
def count_entries(self, subject):
    catalog = getToolByName(self.context, 'portal_catalog')
    brains = catalog(object_provides=IBlogEntry.__identifier__, Subject=subject.encode('utf-8'))
    return len(brains)