If you are trying to get a count for all posts, you could do it with a JOIN. The xf_post table does have a reaction_score
, but that would be the closest thing to an actual counter. The issue with using it, is that's score, not a count. If all your reactions are worth 1 point, then the score is also a count. But if you have reactions that are something other than 1 (by default Wow, Sad and Angry are 0 points), then the score isn't the same as a count (and you would need to query for it).