Counting Geodesics on Flat Surfaces