It depends on our intelligence score (but work with your GM)
This answer is based on the fourth impression, Swords and Wizardry, Core Rules, 2011.
On page 7, the opportunity to learn a given spell is presented in a table. I will use three examples. Int of 13, Int of 15 and Int of 17, and only using the columns in that table for the Int score, the% chance of knowing a spell and the Min / Max number of spells per level you can know. (I can math jax this later)
In t______%Opportunity_______Min MAX
13 __________ 65% ____________ 5/8
15 __________ 75% ____________ 6/10
17 __________ 85% ____________ 7 / All
On the first level, see the list of first level spells on page 46. There are 8 of them.
Enchant person, detect magic, maintain portal, light, magic missile, protection against evil, read languages, read magic, shield, sleep.
- What we used to do in old school games was to start from above
list and work down, checking. (It was the simplest way). We did it
have a GM that made us indicate what spells we wanted, and we would verify
spell by spell to see if we knew it or not. Either way it works.
Check each spell: roll your percentile dice and every time you cast 65 or less, you know that spell. If the 8 rolls are 65 or less, he knows them all. Also, you know No less than 5. Then, if you miss 4 rolls, check the spells again until you get the fifth, or choose one: work with your GM on that.
If your Int was 15, you have a 75% chance of knowing each spell and you have no less than 6 in your book.
With a 17, you have no less than seven, and maybe everything, depending on your luck with the percentile dice where the goal is 85% or less.
On the contrary, if your intelligence score is 11, you can start with a maximum of six of those spells in your book.
As you level up, you will redo those controls to detect higher level spells. Or you will not. 😉
Working with your GM is an expected part of this style of play.
You will see on page 7 where it is written that "the author does not use that rule".
This means asking your GM: is there any reason not to know all 8? If not, then the 8 are in your book.
See the introduction of Tim Kask on page 4, where he talks to GM.
What you have in hand are guidelines; This is a set of "rules" that has an internal integrity that makes it work. Is it the only way to play? Certainly not; Since the beginning of role-playing games, GMs have been encouraged to extrapolate and interpret, so that the game is theirs. If a given rule does not seem "correct", ignore it! Or, better yet, change it! Make your own game or campaign. The only thing GM should worry about is keeping an "logical reality" active in
your campaigns; players rely on that logic to find their way through the dangers and riddles of adventure.