The unread entries cached count (in users, folders and feed_subscriptions) takes a value of zero if the program attempts to set a negative value.

This guards against some potential problems with synchronization, several clients accessing the same account, possible bugs... It is not funny getting an error message when trying to unsubscribe from a feed, just because the unread entries count for the feed is not correct.

Still these cached unread entries counts should be periodically updated by background jobs using plain old SQL counts, to ensure they are correct. This can be done with a specific job or as part of a job that updates feeds. This will be implemented in the future.