fixes for posts category count to take into account unpublished posts