The tweet box on twitter.com and the tweet intent popup appears not to consider fragment identifiers (hashes) as valid in URLs, so it counts them toward the available character count. Check it out:
This says there are -13 characters remaining, and that number goes up or down if you change the fragment identifier. Paste that tweet text into the native app, though, and it correctly highlights the link and says that I’ve got 20 characters left before I hit the 140 limit.
This basically renders web intents useless for sites that do lots of funky stuff in the URL fragment without going through a third-party shortener first. Help!