fix(endorsements-count): be more defensive when getting count