How to add a counter to your post_class in WordPress

For the redesign of this site, I wanted to implement various design elements, in particular related to the Responsive Design, made possible by iThemes Builder.

One of those elements is that when visiting the home (blog index) page in mobile view, only the excerpt on the first post is displayed, all other posts are displayed as titles only. Of course, I could have edited the theme file to add a counter, and conditional code to display or not display the excerpt. However, I try to minimise changes to template files, and prefer to use a function, and CSS to accomplish such functionality.

I [...]