I would put the post no further than 8' apart in both directions.
Are you setting post to use as part of the wall structure, or are you using them just tall enough out of the ground to build a floor structure, then build your walls on top of a floor? If that is the case, and it were my shed, I would build it with the post at 6' intervals on your 24' length. It's a few more post, but a little overkill can be a good thing.