UITextView count while typing in Swift:
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
let textCount = textView.text?.count ?? 0 + text.count - range.length
self.textCountLabel.text = "\(textCount)"
return true
}