TL;DR: 6/8 implies a measure of 6 eighth notes, by default grouped into two groups of three. How many "beats" you feel or how you count it can vary. To those of you who teach music: I don't really care how many "beats" you say are in 6/8, but please teach students the groupings of the eighth notes, not just "6 beats per bar." Otherwise, students won't feel the meter correctly, and it will lead to lots of confusion later.
A lot of questions appear on the nature of 6/8 in this forum. Specifically, this question of "2 beats" vs. "6 beats" seems to cause a lot of arguments and consternation among beginning music students.
And for good reason. Different teachers often have different opinions. I've seen lots of practical method textbooks written for instruments that introduce 6/8 as "6 beats per measure, where the eighth note gets the beat," whereas the majority of music theory textbooks introduce 6/8 as "compound duple time," implying a two-fold division with the word "duple." The first group generally starts yelling about how the 6 is obviously in the time signature, while the latter group shout back about the history of time signatures with 6, 9, and 12, and how they obviously indicate "compound" meters.
I have to admit, as someone who leans toward the latter view, that I sometimes cringe when I see 6/8 introduced in textbooks with the "6 beats" definition, as it's generally an unhelpful way to view the meter 95% of the time. And it doesn't get at the two-fold division implied by the 6/8 meter, which emphasizes the first and fourth eighth notes of the bar (even at slower tempos). But, there are times (maybe <5% of the time) when "6 beats" makes sense as a description. So, that view isn't "wrong" either.
It all has to do with the definition of a "beat." Which I'll come back to momentarily. But first, let's discuss why the answer to this question is ambiguous in the first place.
Let's start with something more basic. How about 4/4? How many "beats" are in a 4/4 bar? Most people will say "obviously" four. But the metric organization of a 4/4 bar is more complicated than that. In particular, there are stress accents implied: the strongest on the first beat, a secondary/medium stress on the third beat, and weaker beats on 2 and 4. Overall, a bar of 4/4 has a pattern of Strong-Weak-Medium-Weak stresses. From one perspective, there are 4 primary components here. But if we choose to focus on the more "stressed" beats, we might focus only on beats 1 and 3 (and in fast tempos, sometimes we might tap our feet or clap with only every other "beat" like that), i.e., two "beats" per bar. Or, in another sense, we could choose to feel only the strongest stresses, feeling that "downbeat" like the conductor's hand coming down only once per bar. These are all ways to "feel" the meter. We could even emphasize lesser levels of stress, particularly at a slow tempo. We might sense 8 pulses (STRONG-and-WEAK-and-MEDIUM-and-WEAK-and...) ticking away at the eighth-note level.
What I'm describing here is metric hierarchy. We often are taught to feel meter as a hierarchical pattern of levels of stresses, some stronger, some moderate, some weak. Depending on which level we hear or choose to emphasize, we may sense more or less important "beats" in a notated 4/4 bar.
The same goes for 6/8. For historical reasons, 6/8 implies stress on the first and fourth eighth notes of each bar. (STRONG-weak-weak-MEDIUM-weak-weak...) That's different from 3/4, which implies stress on the first, third, and fifth eighth notes. (STRONG-weak-MEDIUM-weak-MEDIUM-weak...) In both cases, we see groups of twos and groups of threes, just at different levels of the metric hierarchy. At a slow tempo, you might choose to follow both 6/8 and 3/4 at the eighth-note pulse level, but you'll hear different patterns of stressed notes.
All of this is great, but you may be saying by this point: "So which is the BEAT?!" And that's a really complicated question. Generally, in common English when we refer to "beat," we're referencing something that music theorists often call tactus, that is, the metric level where you might tap your foot, or the place you "feel the pulse."
And that's a difficult thing to predict. Different people may feel a different tactus for the same piece. (This is why you sometimes will see some members of a crowd clapping twice as fast as others as they're clapping along with music.) Psychological studies have shown that most people tend to prefer a tactus to fall in the range from about 40 beats per minute up to around 160 beats per minute, with the maximum salience of beats preferred around 100-110 bpm. In some extreme cases, people may feel a tactus down to around 30 bpm or up to around 240 bpm.
If you're hearing a piece in 4/4 played at a tempo of quarter note = 160, what determines whether you tap your foot at 160 bpm (the quarter note "beat" level) or perhaps at 80 bpm (at the half note level, a little closer to the "most comfortable" and preferred tactus range)? Or, to get back to our 6/8 question, why might one piece be notated and felt with a tempo of dotted-quarter = 50 bpm while another piece is notated and felt with an eighth-note = 150 bpm? Both are arguably at the "same tempo," but the "beat" may be felt quite differently.
A lot of it is influenced by style expectations, a sense of "groove" in popular styles, etc. It's rather difficult to predict from just looking at a piece on the page, regardless of its notated meter. Yet crowds often naturally will gravitate toward a particular preferred "beat."
Still, in the end, whatever level we choose to tap our feet or clap our hands to, there will be levels of divisions of 2 and/or 3 at higher and lower levels of meter. Our most common meters capture these different configurations of 2s and 3s: 6/8 has a two-fold division at a higher level and a three-fold division at a smaller metric level. 3/4 has a three-fold division at a higher level and a two-fold division at a lower level. 2/4 and 4/4 have two-fold divisions generally for at least two levels. 9/8 implies a three-fold division at two levels.
Note that the default division at each level is two-fold in modern rhythmic notation (unless triplets are written). Historically, there could be three-fold division at even more levels, though it was rare. (On a couple occasions, I have seen a 27/16 or 27/8 time signature, denoting a three-fold division on three consecutive levels. But that's quite complicated to notate effectively in modern rhythmic notation, which is why we resort to triplets.)
But again, note that all of these written meters don't necessarily indicate where you should "feel the beat," i.e., where you tap your foot. That's a matter of tempo and musical style, not the time signature.
So, to go back to the original question of 6/8 -- in something like 95% of cases, the tactus ("beat") is meant to be felt at the dotted-quarter level, with two primary "beats" per measure. However, particularly at very slow tempos, people may tap their feet or sense that the "primary pulse" of the meter is at the eighth-note level, implying six "beats" per measure. (In a piece in 6/8 with eighth-note = 60 bpm, very few people are going to be tapping their feet only once every 3 seconds at 20 bpm to accord with the dotted-quarter groupings.) But even in this latter case, those beats are still grouped into two groups of three eighths. The metric hierarchy levels are all still implied by the time signature, regardless of how you count the measure or at what level you "feel the beat."
In the end, I'd say one of the hardest things for beginning students to realize is that the score is NOT "the music." It is a blueprint to follow, not necessarily how you "feel" it (or conduct it or tap your foot to it or interpret it or dance to it). Modern time signatures are meant as a shorthand to show the relationships of the 2s and 3s of metric hierarchy, not necessarily as a way to tell you where to tap your foot or how many "beats" to feel per measure. Once you realize that, it doesn't matter how many "beats" are in the 6/8 bar. It's just a representation of specific metric level groupings... no matter which level you use to tap your foot or how the conductor swings a baton.