how to count characters