First of all, you need to know the desired width of the piece you want to weave. Let's say it’s 20 inches. (At 24 ends per inch, you would have needed 480 ends of 10/2 cotton.) If you have the Master Yarn Chart, you can look up the sett for 5/2 cotton appropriate for the weave structure you are using. 24 epi is the sett for balanced plain weave in 10/2 cotton, so you’d probably be looking for the sett for balanced plain weave in 5/2 cotton, which is 16 epi.
To get a 20 inch width using 5/2, therefore, you’d need 320 ends.
Next, you need to look at the draft you plan to use. It may include a repeat that does not easily divide into 320 ends the way it divides into 480 ends. You might have to make some adjustments to the total number of ends, either more or fewer, to accommodate the number of repeats in the draft.
P.S. And, thank you to all of you who pointed out my bad math in the last Ask Madelyn. I said: You can have 4 threads/dent in an 8-dent reed (32 ends per inch) or 3/dent in a 12-dent reed (also 32 ends per inch). Er, that would be 36 ends per inch. The sleying order would have had to be 2-3-3 to get 32. This wasn’t really related to the question I was answering, but shame on me anyway.