count only https character when input url is https as twitter does
adapt log text
use twitter's api entities to ease t.co resolving and resolve one step further classic shorteners