How's this concept:
Each peak is considered to encompass a certain area. So, the Needles are auxiliary, not separate, peaks. Muir is far enough away to count as a separate peak. Therefore, when you hike past the point where you would otherwise turn right to Muir, then you are climbing Whitney. Before that, you are just hiking toward any of a number of peaks on a ridgeline.
If this makes sense, then each time you drop back from Whitney to the Whitney/Muir trail split, you can claim a fresh ascent.
See wikipedia: "It is ... the smallest descent which one would have to make from a summit in order to re-ascend to a higher peak." I know that Muir is not a "higher peak", but it is considered a mountain in its own right.
http://en.wikipedia.org/wiki/Topographic_prominence