finished char counting