Delete the oldest folders regardless of age.

I have a backup program that creates a new folder each time it runs. In the new folder are changes that occurred since the prior backup. What I would like to do is keep the newest 3 folders of changes, regardless of how old they are, and delete anything older than that. And then immediately empty the trash. So the 4th oldest folder would be deleted whether it is 1 week, 1 month, or 1 year old, and the 3 newest folders would remain.
Can this be done?
Can this be done?