How much it counts really can vary depending on the members of the AdComm. At my grad school, we had one member of the admissions committee who wouldn't even look at your application if you didn't go to a prestigious enough school. So, if you applied that year and didn't go to a top school (I'm not 100% sure how she decided this, but it was pretty strict with a particular bias against state schools), you had a guaranteed vote against you.
A few years later, our admissions committee rotated around to be dominated by faculty who went to lesser known undergrads or had friends who went to lesser known undergrads, etc. The name of your undergrad switched from on of the most important parts of your application to a pretty minor part. That was all within the same program at the same school in the span of just a few years!
If you are in HS now, there is no way to know which people will be on the Ad Comms when you are ready to apply to dental school. My advice would be to get the best education you can. Don't go to a school that is above your head because you think the name will impress -- if you are overwhelmed, you won't do well, won't learn as much and you'll only hurt yourself in the long run. At the same time, don't go to a school way below your level, because you won't be taking full advantage of the opportunities you could be taking.