The counter glitch is a common bug in Pikmin where the counter displays false numbers. After certain actions, the counter might display incorrect numbers, and often even numbers that are impossible according to the games mechanics, such as there being more Pikmin in Olimar's control than are on the field in total.
Assuming the counter were to say (007/006/XYZ), as it does in the image, even when all Pikmin are killed or are put back into the Onions, the counter will say there is, in this case, one Pikmin in Olimar's command. It is still possible to get 100 Pikmin into the field. The counter will simply go to (100/99/XYZ) when 99 Pikmin are brought to the field, and will stay at 100 when the 100th Pikmin is brought out.
Cause
The events that induce this are varied and vague. More unconventional deaths seem to be an important factor, as the glitch can be quite easily reproduced by letting Pikmin be killed by the Smoky Progg, an enemy not often fought, and is also encountered often in The Forest Navel, where it seems to be especially linked to abyssal deaths. However, there have also been cases reported in which there were no enemies around to have killed Pikmin and there being no other indication of Pikmin dying. This indicates that the counter glitch may very well be linked to map-related bugs as well, such as the bridge glitches.