How many notifications should be saved?

In the design for an app with a basic user/post/subscribe system how many notifications should be kept before deleting old ones? Or should they all be kept?

(Note I'm referring to an in-app notification tray, not push notifications)

The back-end as a service I'm using charges for the total data stored, so I would be worried about users going inactive and accumulating tons of unread notifications which in turn could cost me, especially if they followed a lot of active users.

If you were a user that checked an app like once or twice a year, would you be put off if you only saw the last 9 notifications or some amount?

I guess another option would be to stop pushing notifications to people who hadn't logged in for like, a week or two? Not sure if this would be an effective alternate. Probably wouldn't be great for user retention, but I don't know enough about that to say.