Database update based on other data type changes

Hi I new to Bubble and need help with database manipulation.
I have data type Users with fields “wins”, “losses” and “points”
I have another data type called Scores with fields “winner”, “loser”, “date” and some others that are not important for this issue.
I have a workflow set up that populates the Scores type. What i want to do is make a backend workflow that will trigger when Scores is updated. The trigger needs to lookup the Scores type, count the number of times that current user has appeared in winners field and accordingly update the Users type.
For example: current user has won and saved his match score. The entry is added to Scores. The database triggers and counts how many times his user name is in Scores
“winner” column, updates that value in corresponding Users “wins” data. Also based on the number of wins data, his points are automatically updated (e.g. 2 pts/win)