All URLs inside Tweets are wrapped in a t.co
shortened URL. The full expanded and display-friendly URLs are exposed in Tweet Entities objects on the API, but only the t.co
URLs matter in the Tweet length.
For instance, if you are tweeting any HTTPS URL today, it will be 23 characters long when shortened (22 for HTTP URLs), leaving you 117 characters for your Tweet text.
To answer your question, both examples Tweets you mentioned would have a length of 51 characters: 29 for the sentence, 22 for the HTTP URL, regardless of its original length.