If +5 notification, group them into one

I have like notifications on my APP, and I would like when the person receives more than 5 LIKES, no longer counting 1 to 1, but joining them and showing how a single notification, example: user, user liked their publication, and more 10 people

You should be able to use conditional statements for this: if <5 likes, show text A; if > 5 likes, show text B.