The Talmud specifies that tefillin straps must be long enough to reach one's middle finger, and records the practice of Rav Aha bar Jacob to tie and then "matleit" (plait? wind three times?) them.Menachot 35b However, the passage leaves unclear where the measuring is done from, whether the reference is to hand- or head-tefillin, and what exactly the meaning of "matleit" is. Combining and interpreting the Talmud's statements, Maimonides, Tur, and Shulchan Aruch ruled that the strap of hand-tefillin must reach from where the tefillin is placed on the arm, as far as the middle finger, where it must be wound three times around the middle finger.Mishneh Torah Hilchot Tefillin 13:12; Tur Hilchot Tefillin 27:8; Shulchan Aruch Orach Chaim 27:8 Rema wrote that it is not necessary to wind around the finger (rather, the straps must be long enough that one could wind around the finger);Darchei Moshe haKatzar Orach Chaim 27 letter 5 however, this leniency does not appear in his comments to the Shulchan Aruch. In addition to the windings around the finger, the Shulchan Aruch states that the custom is to wind six or seven times around the forearm.Shulchan Aruch Orach Chaim 27:8
