better line counting and works with symbols