The number of compartments and scrolls in the tefillin
There are four parshiyos (paragraphs) written on the tefillin scrolls - kadesh, v'haya ki yeviacha, shema, and v'haya im shamo'a. For the shel rosh, each parsha is written on a separate parchment and inserted into one of four separate compartments in the bayis. For the shel yad, the four paragraphs are written in separate columns on one parchment and inserted into a single compartment of the bayis. The need for these two arrangements is based on the pesukim of "they shall serve as a sign on your arm" (sign is singular) and "they shall be a totafos between your eyes (totafos is plural).
(סעיף א-ב וס"ק ו)