count() vs count = count + 1 in Flask
I'm not an expert but I think if you have the like and unlike button then you just do
like = like + 1 #in case of like 
like = like - 1 #in case of unliking
Because the .count() function works in a Time complexity of O(length of yes's array) but if you always updated you can access the like count in O(1)
I am creating a like comment and reply feature using Flask. I have two options:

if a user likes comment, variable will increase by 1, Code: like = like + 1, and it will be updated in the database. The total count will be retrieved by something like {{ like }} in jinja template

or

Saving yes for the comment id in the database, then use .count() to retrieve the total likes.

Which would you recommend and why, thank you!