Fix css "display: none" assignment (typo).
Return 200 response in more cases, but not necessarily with all values.

If the external request fails return 200 instead of 400 but don't set the unknown values.
script.js: Check the JSON response explicitly.

Check the data fields of the JSON response before using the value. Also hide the counter until a value has been properly fetched.