The Shulchan Aruch · Orach Chayim
אורח חיים ל״הOrach Chayim 35
Siman 35 of 697 in Orach Chayim — 1 se'if
הלכות תפיליןLaws of Tefillin· siman 35
Se’if 1א׳
נָהֲגוּ בְּמִנְיַן הַשִּׁטִּין לִכְתֹּב בְּשֶׁל יָד שִׁבְעָה שִׁטִּין בְּכָל פָּרָשָׁה וּבְשֶׁל רֹאשׁ אַרְבָּעָה שִׁטִּין, וְאִם שִׁנָּה לֹא פָּסַל:
The practice in the count of the lines [marked on the parchment to guide the scribe] is to write on the hand tefillin parchment seven lines for each parasha. For the head tefillin [the practice] is to mark four lines. If one diverged from this practice he did not invalidate the tefillin.
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0