added condition to check if there are shares within the post else default print 0