A very big part of being successful in the hunter ring is learning what the ideal stride length feels like. Adding or subtracting a stride in a line is a major fault so memorizing what is expected of you at each distance is a must.
Rather than standing at the in-gate attempting mental math, it really is best just to memorize the striding. If you are showing a horse, memorize the most common line lengths (usually four, five or six strides) for a 12-foot stride. That's just three numbers to remember and the math to determine how short or long those lines will ride is easy! If you're riding a pony, memorize the most common line lengths for the ideal stride corresponding to your pony's size category.
Most courses are set for a 12-foot stride, so that is what you should aim to get a feel for at home. Some novice classes at schooling or 'B'-circuit shows will be set using an 11- or 11.5-foot stride to account for smaller jumps and less experienced riders. The higher hunter classes on the 'A'-circuit, on the other hand, will be set for a longer stride due to the bigger jumps. Because the distances will be written on the course diagram between the fences, there will be no surprises while you're on course!
The course designer's aim for the hunter ring is to make each horse look as good as possible. This is why you will find that the distances in lines heading away from the in-gate will be shorter than the distances in the lines heading towards the in-gate. Horses will generally lengthen the canter slightly when they're coming towards home, so this will make all of the lines ride roughly the same.
Keep in mind that getting the striding in the lines alone is not enough; the judge does not want to see a slow, relaxed canter around the corners and then a rushed canter in the lines to make the distance. Keep your canter the same throughout the course by having every stride you take be the ideal length for your class.