All phone carriers measure text messages in character batches called segments. For all the outcome messages sent via campaigns, workflows, manual messages sent via chats and income messages from your customers - you will be charged credits, based on the number of segments in the message. One segment is 160 characters, if there are more segments in the message than one - 153 characters for the segment. One segment including emoji is 70 characters, few segments including emoji - 67 characters for every segment. Single MMS or MMS with adding an amount of characters - one segment, but costs for MMS and SMS are different as cost for international SMS.
Pay attention that calculation for variables and links is automatic and estimated. When messages are generated and the names of your customers are inserted into them, the final recalculation of characters is carried out and credits can be deducted more or less than it was on editing/planning.
Information about messaging rate you can explore on the Subscription, Plans page.
More about calculating and encoding characters you can read on the Twilio article.