Those numbers are the ones given to the thread diameter of the screw itself.
Thread pitch on Metric, and SAE are different, so they don't interchange between the two.
Never tried to use M5, but it certainly wouldn't be proper.
Why are you having trouble finding 10-24?
That's a common size.