added fix to getPostCount in the share controller