It helps to keep a herd book. I update it twice a month then at the end of the year you just have to go through and add up the numbers :)
We record each animal born in the herd book. The date it was born, the sex, if it died, we kept it, or sold it, the animal number, the dam and sire, litter...