Don't store counts when the API call failed.
Harden the add_stat method to never allow storing a false count argument.