Let Γ\H be a Shimura curve, where Γ corresponds to the group of units of norm 1 in an Eichler order O of an indefinite quaternion algebra over Q. Closed geodesics on Γ\H correspond to optimal embeddings of real quadratic orders into O. The intersection numbers of pairs of these closed geodesics conjecturally relates to the work of Darmon and Vonk on a real quadratic analogue to j(τ 1 ) − j(τ 2 ). In this paper, we study the total intersection number over all embeddings of a given pair of discriminants D 1 , D 2 . We precisely describe the arithmetic of each intersection, and produce a formula for the total intersection of D 1 , D 2 . This formula is a real quadratic analogue of the work of Gross and Zagier on factorizing nrd(j(τ 1 ) − j(τ 2 )). The results are fairly general, allowing for a large class of non-maximal Eichler orders, and non-fundamental/non-coprime discriminants. The paper ends with some explicit examples illustrating the results of the paper. Contents 1. Introduction 2. Quaternionic background 3. Basic results on intersection numbers 4.