ive been following a tutorial for a few days now and i cant get this part to work.

its ment to display the count but ive i use the code below it works but if i use the 2nd code it dosent work...