Close to 54, if you play the game well.
That figure is the practical upper limit rather than a starting allowance, so it takes some management to reach.
Plan which horses you keep before you fill the barn, since space is the resource that runs out first.