Actually none of those peaks will tell you exactly how many carbons there are. At some point you are going to have to make an educated guess. All we know from this information is:
You can use a combination of this information to make an educated guess of how many carbons, chlorines, and or bromines exist in the molecule.
Here is a practice problem of me using the M+2 and M+4 peaks to relate to a molecule with 2 halogens on it. https://www.clutchprep.com/organic-chemistry/mass-spect-isotopes/?c_id=3592#content-item-5069
Hope this helps!