(Ninjaed, but I've written it, so posting. Any conflicting info might well be down to my error/bad editing. Will check myself once posted.)
M-notation means it's in metric.
The number immediately after the M itself is the major diameter of the screw-thread in mm (easier than the #0 to #10 grades in imperial). The minor diameter (the depth within the screwthread) is usually not mentioned as it is a factor of the major one (thread-'heights', side to side).
This is usually followed by the thread pitch of the screwthread (as threads-per-inch in the imperial version of the notation) of mm/thread, i.e. distance between each turn of the thread.(Edit: Yeah, if there's no smaller number after the diameter on, then it probably jumps from diameter to length and skips the (presumed standard) pitch for that particular screw-size. But worth trying to find out in both threads/mm and mm/thread to try to make a definitive match between subtly but importantly different products.!)
Then usually follows the length of the screw. Some variations (e.g. major-diametered smooth barrelling for part of the length, for screws used to hold rotating parts together like a screen hinge) might have more complexity, but I doubt this relevance to you.
If you have access to a micrometer (especially a pitch-depth one), vernier-caliper or similar measurer, take one of the surviving screws out (remembering where you took it from!) and see what its radius and pitch might be. A simple mm-graduated ruler (ideally steel, or from a good quality plastic graphical design set) can be used for this if you have a steady eye and hand or something with nice hard right-angled edges to assist you to read the diameter above the resting tangent. I imagine it'd be a whole- (or, at worst, half-) millimetre resolution of value that you'd need to discern. Thread-length may be to the nearest 5mm, unless it's 12mm.
If in doubt, take the laptop or at least a sample screw (of each known type, see below) to a suitable hardware store/device repair for their
advice (and, if they can, to purchase from/through them to make it worth their while) and make it easy to check you're getting the right item. Align two screws anti-parallel (adjacent axes flush, screw-heads at each end top'n'tailing over the tapping end) and you should be able to check for any differences in pitch/etc.
The head being spade/cross/posidrive or something more exotic (e.g hex-star, with or without 'security' middle pin - unlikely on a laptop but maybe a concern if they do exist) doesn't matter so much as the style of the head, being possibly flatly cylindrical, countersunk-like of a form of rounded flattened dome (apart from the screwdriver depression) and how it fits onto/into the case depression, though if you match the latter you probably match the former. And there's plenty of 'hobby' miniature screwdriver sets that contain any or all tip-types you might need, if you don't already have one, perhaps hanging off a keyring loop.
Without looking up your model, I'd expect screws to be grouped into case-closing screws (screw into the case-top/keyboard side case) and component-holding (holds the mobo assembly down, maybe the keyboard subunit if it's designed to remove without opening the case itself) and side-module anchoring (undo to slide the HDD/optical drivemetc chassis out the side) and they may be marked on the underside plastic with different raised 'hint' text, each of these being a different spec (typically length) of screw. So getting umpteen case-screws might not help if you also need to replace the screw that stops something internal from rattling, etc.
Also address why
the screws are lost. Usually they've been undone during (or in the attempt to) opening the laptop for repair, and insufficiently tightened or lose the factory-given 'stiction' (rubber/wax layer) explicitly meant to stop them jiggling loose. If there was a small nut on the inside it could have come out of its seating. Other times they've been over-
tightened, stripping some or all of the internal thread they need to hold in (if in molded/self-tapped plastic receiving hole, rather than a metal plug-nut). Though it's also possible to lose screws that have been static since the factory, post-purchase fixes tend to exasurbate the tendency to work loose again.
Apart from the lost (presumably not still rattling around) nut or completely
stripped internal thread, a very small
coating of rubber-solution might re-establish enough friction to delay the reloss of the replacement screw (and might help with other mismatches, but don't rely on it) by absorbing mechanical shocks that might loosen them again.