Is the apostrophe always necessary when denoting the number of individual items that are usually grouped together such as M&Ms?
Typically, an apostrophe is used with plurals only when leaving it out would cause confusion. For example, in the sentence All the students got A's, you'd use an apostrophe to make A plural because otherwise it'd be the word as. M&Ms, on the other hand, is clear in meaning without the apostrophe, so using one isn't necessary.
Your M&Ms example is just a regular plural so no apostrophe.