Add counter to avoid infinite loop when geocoder fails