All characters that are sent in a message are counted. The character counter at the bottom of the 'Compose Your Message' screen estimates each personalised field as being 10 characters. This is only an approximate guide as your personalised field may be more or less than 10 characters.
The best way to ensure that your message will not exceed 160 characters is to determine the longest contact (in terms of number of characters) for the personalised field. If it's over 10 characters then make sure you add this amount to the counter at the bottom of the screen.
For the below example if 'Jessica' was the longest name in the group that I was sending my campaign to, then I would know that my message won't exceed 160 characters as my counter indicates that I've only used 153 characters so far.