Sometimes your Chicken/Goat will overlap one another because they live in a single Coop/Pen. You can long-press and move the Chicken/Goat to count them.