If the objects in a group can all be put into pairs without having one left over, then the group has an even number of objects.
If the objects in a group are put into pairs and one is left over,
then the group has an odd number of objects.
One way to find if the number of pigs is even or odd is to put the pigs into pairs.
One of the cupcakes does not have a pair.
So, there is an odd number of cupcakes.
Another way to find if the number of cupcakes is even or odd is to count the number of cupcakes by 2s.
There is one cupcake left over when counting by 2s.
So, there is an odd number of cupcakes.