I ran my website through Validator and it returned two errors, both of which relating to the official Twitter follow button code.
The code for the larger button is:
<a href="https://twitter.com/gary" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @gary</a>
<script type="text/javascript">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Validator returned these errors when checking my site as XHTML 1.0 Transitional:
there is no attribute "data-show-count"
and
there is no attribute "data-size"
So what is the deal here? Obviously these two attributes exists. Removing the data-size will return the smaller version of the button.
It should work with HTML5 Doctype.