The official sources have no guidance on this, and are inconsistent
The example you use, the Staff of the Magi, does not follow any clear rules about its charges. For example, it has 7 charges of Conjure Elemental (5th level), 7 charges of Fireball (at 7th level), but only 2 charges of Knock (2nd level).
As an aside, I would imagine that higher level spells should have fewer charges, as they are more powerful.
The only guidance in the DMG on creating magic items states (referring to a table on page 285):
This column of the table indicates the highest-level spell effect the item should confer, in the form of a once-per-day or similarly limited property. For example, a common item might confer the benefit of a 1st-level spell once per day (or just once, if it's consumable). A rare, very rare, or legendary item might allow its possessor to cast a lower-level spell more frequently.
That's as much as you get on the number of charges.
Make cost scale with charges
If you're having players make magic items, you might run into the problem that the items are too powerful. For example, if a wizard casts fireball a few times every day, and makes a wand of fireball, they're effectively getting free spell slots from the wand. Additionally, allowing them to make the item themselves means that they can tailor it to be much more powerful for their character.
The DMG provides no guidance on how magic items are made, so I'm assuming you have some homebrew rules for that. I'd suggest that the cost, whatever it may be, scales exponentially with the number of charges. A 1-charge wand might cost 100 gp, but 2 charges might be 200, 3 charges might be 400, 4 charges cost 800, and so forth. One of my DMs builds magic items this way, and it works to make magic items that are useful but not overpowered.