I don't entirely agree with the answer of Arno or a similar comment. That would be entirely true in Europe, I think, but this a US view.
An undergraduate math program in the US has about 40 semester courses of which about half are in mathematics. The rest cover a variety of topics in science, the humanities, writing, etc. Those courses are generally light in research as is the program overall (most places). One or two CS courses might count in that math major (algorithmics, say). The math courses also cover a broad range of math topics including analysis, algebra, topology, and some others. In other places, the undergraduate program seems to be much more focused on a single field. I believe this is the case in UK (Arno can comment) and Germany at least and perhaps generally in Europe.
Next, note that it is relatively common for students to change majors/focus when going directly from a BS to a doctoral program and admissions committees are used to dealing with that fact.
Third, the most common path in the US is directly from BS to a doctoral program, with a MS possibly earned along the way, sometimes just by filing a form, sometimes with a modest additional task or two. The first task of such a student is to prepare themselves for comprehensive examinations through coursework at an advanced level. One seldom starts math research immediately, even if they have a MS since comprehensives are still a gate.
Finally, the only way to know if your record stands up is to make application to a few places and see how far you get in the process. If you apply only to "top" schools, you may not get very far, but the US has many, many, research universities at which you can find a good/great advisor.
A strategy might be to simultaneously apply to both masters and doctoral programs so that you have a backup that still advances your goals if you aren't accepted into a doctoral program. But before you sign up for a masters, be sure that the coursework is likely to also enable passing comprehensives, which can be very difficult. Typically they cover a broad range also (analysis, algebra, topology, ...)
See the answer for the US here: How does the admissions process work for Ph.D. programs in Country X?
Forty courses for a bachelors degree is common in US. Another scheme has about 32, but still only about half in the "major". The coverage is about the same, but the dividing lines between things a bit different. Top students might take a few extra courses.