Element ID's
ID Styling
You can use as many ID's as it makes sense too, ID's should be treated singular classes that are not shared with any other element or class. So if you only have one slider gallery per a page then you could use #gallery
however if you want to use multiple galleries then ideally you should use unique id's for both i.e #gallery-main
#gallery-secondary
. Then in your CSS you used shared CSS along with unique i.e
#gallery-main,#gallery-secondary{max-width:33%;}
#gallery-main{background:#000;}
#gallery-secondary{background:#FFF;}
ID Experience
You should be also aware that ID's are useful for enhancing the user experience for your users with 'go tos' i.e
<a href="#product-details">Product Details</a>
<div id="product-details" class="funkybox"> </div>
Sites that use Goto's will often have hundreds to thousands of ID's and this is completely acceptable as its improving the way people quick navigate to the content they want, without the need of additional scripts (Great for accessibility).
ID Summary
There's no such thing as too many ID's as long as it makes sense to use that many within your project.
HTML5 Article, Section, Header, Main etc.
There's nothing wrong with using DIV over article or section for validation or search rankings but for markup semantic markup it can vary from project to project and you should use whatever makes sense for your project. One site may require one articles, a few sections while another site could use hundreds of each, it really depends on the content... generally sites that are blogs and will have plenty of articles etc, while a business site may just decide to use DIV with ASIDE.
I recommend you use http://html5doctor.com/ and use the elements that makes sense for your project. By the way SECTION is one of the most least tags a site should generally use, in the start of HTML5 lots of people rushed in and used section to sparring for cutting up elements. Generally on HTML5 Doctor your notice a vibe that DIV is still the leading element for many reasons and you shouldn't use the HTML5 tags just for the sake of it.
Ideal Class Naming
Name classes according to the content, not appearance... This is purely down to personal opinion and dependent on your project. A big project for a large site with huge amounts of traffic should try to use shorter class names to avoid unnecessary increasing the size of both HTML and CSS.
So you could use something like:
.comment-box-below-article{}
.comment-box-below-product{}
or you could rather use a .cbba{}
and .cbbp{}
but again this is down to personal perf and it may vary on if your using SASS or LESS too as you could script a shorter-name for live sites, and longer names for development.
How many classes should I use?
Don't use too much classes... You should use as many classes as your project needs, there's no right or wrong here and you should use as many as you like or few as you like.
Generally using less is better, for example:
article aside {}
will be better than using class names if these elements are the same across the site, but if they vary from page to page then you should opt to use classes vs element styling.
If your articles strictly use a format like so:
<article>
<header>
<h1>Article Name</h1>
<span>Something short about the article</span>
</header>
<div>
Content goes here
<aside>
<ul>
<li>Related Link1</li>
<li>Related Link2</li>
<li>Related Link3</li>
</ul>
</aside>
</div>
<footer>
Published by Blah
</footer>
</article>
Then you could use:
article aside{}
article div{}
article header h1{}
article header span{}
But then the problem can occur when you need multiple spans in the header or multiple divs and then your need to use multiple pseudo which isn't a bad thing but can get messy as the CSS gets bigger and bigger
Correct Planning
Your CSS should be planned where your site will be in the future, if you can't see the need of CSS increasing, changing then you can get away with using as less CSS class and Id's as possible, but if the site is going to get bigger, better and then you should forsee this changes and try to make the CSS as adapter-able as possible and using many class names and ID's, elements will allow this.
article.class
andarticle.class section
, notarticle.class
andsection.class
LIMIT 1
).class section
is even worse, now it selects ALL sections, then matches if they're in.class
. Most right selector has to be the most precises :) Tip: Google -> Css Sizzle.class section
or.class article > section
makes for a much more modular CSS design. If your CSS is nothing but ID selectors, then you're going to have an incredibly complex and needlessly redundant pile of styles.