check count on everything before trying to render any markup