Counterpoint can be written for basically any number of independent parts greater than 1. (And even for a solo instrument, there's something called compound melody that can simulate counterpoint as if in multiple voices.)
Counterpoint in more than four parts isn't only in the 19th and 20th centuries, either. Bach, for example, wrote several motets and other pieces that involve up to eight parts. Often with 8-voice counterpoint, the voices are divided into two 4-voice "choirs" that function somewhat separately. But there are extended sections of true 8-voice counterpoint in those pieces. More commonly, baroque composers occasionally added a fifth or sixth voice at times, likely imitating the common late renaissance mass texture which frequently had five voices in counterpoint.
(For an extreme example, see things like Spem in alium, a renaissance motet by Tallis that involves 40 independent voices in "counterpoint." I put that in quotation marks partly because a texture that enormous poses huge challenges for voice-leading, so the motet mostly has very slowly moving harmonies and a lot of voices just arpeggiating notes within a harmony.)
This confuses me a lot because I'm currently studying harmony and
voice leading and everything is literally 4 parts.
Some textbooks use the standard SATB 4-voice framework as a pedagogical tool to introduce students to the beginning notions of counterpoint. That doesn't mean 4-part counterpoint is the only possibility or even the most common one. Four voices is chosen partly in introductory courses because it allows for the use of full chords (including full seventh chords), and also brings up issues like proper doubling in triads, etc. The texture is thick enough to teach students to learn to scan for things like parallels, etc.
Two-part and three-part counterpoint are possible and particularly common in some genres in the baroque period, but they sometimes aren't studied in depth in intro courses. Part of the reason is because music theory pedagogy today is very chord-focused, whereas counterpoint with fewer voices requires a somewhat different treatment of harmonic concerns. And music with 5 or more voices doesn't raise a lot of additional "rules" to deal with, but it can be harder to write for beginners simply because more voices are present and thus there are more opportunities for errors in voice-leading.
How does one analyze music with more than 4 parts?
I'm not certain what you mean exactly by "analyze" in this context. You approach music with more than 4 parts in the same way as 4-part music, for the most part. If there's something specific that you think might work differently, let me know in a comment, and I can expand on this.
Are there any books that focus on more than 4 parts?
Possibly, though I can't think of one off the top of my head. You may want to have a look at books devoted specifically to counterpoint, rather than a "harmony and voice-leading" intro textbook. Generally, books on counterpoint tend to devote a later chapter or two to textures involving 5, 6, 8, or more voices.
Do I need to focus on SATB to see how voices resolve?
No, I don't know that it's particularly helpful to attempt to reduce a thicker texture to four parts in most cases. If the music is truly contrapuntal, a fifth or sixth voice will have its own line and its own status, which should be analyzed as its own thing. (One exception are the "double-choir" 8-voice pieces like I mentioned above. SATB analysis might be helpful there in understanding the individual choirs.)
Note that I'm discussing true counterpoint here. If you're referring also to harmonic textures that just have an extra chord note or two doubled, that's often not additional "counterpoint." That's just doubling notes in a chord to create a thicker sound.
All of that said, whether the texture is more chordal or contrapuntal, the motion of individual voice lines should still obey the voice-leading and counterpoint principles you are likely learning for SATB texture. For example, if you look at a place where Bach has 8 voices going on at the same time, he usually will still only has one voice with a leading tone or with some other moving dissonance (like a seventh). So, rules you may have learned like "don't double the leading tone" or "don't double the seventh," still usually apply with more voices. You still need to avoid parallel fifths between all parts, as well as parallel octaves. (Sort of an exception to the latter is when you deliberately double a part in a different octave. For example, an orchestral piece might have the cellos playing the same notes as the double basses an octave higher. Those are not "two different parts" moving in "parallel octaves" but is rather thought of as one counterpoint part that is merely "doubled at the octave.")
The hardest thing about writing or analyzing music in more than four parts is considering the effects of doubling, as well as following all the "rules," just now with ever increasing possibilities of interaction between voices. For 2-voice counterpoint, there is only one pair of voices to check for parallel fifths. For 3 voices, there are three pairs. For 4 voices, there are six pairs (SA, ST, SB, AT, AB, TB). For 5 voices, there are 10 pairs, and for 6 voices, there are 15 pairs. Every harmonic shift requires more thought and attention to detail because of these factors, if one is following strict counterpoint.
But again, if you are also referring to segments of music where an additional note or two is doubled in a chord to give a 5-part or 6-part sonority, the composer may not even be worried so much about the formal rules of "counterpoint" in that case. Some "added voices" may just function like the "doubling at the octave" idea I mentioned above, filling in some chords to create a richer sound.