let textarea = document.getElementById('imp1');
var result = document.getElementById('result');
let count = {};
textarea.oninput = function (){
let textarea = this.value;
let length = textarea.length;
let last_symbol = textarea.charAt(length - 1);
if(count[last_symbol] === undefined){
count[last_symbol] = 1;
} else {
count[last_symbol] += 1;
}
result.innerText = count.value;
<textarea name = "sasha" id = "imp1" cols="50" rows = "5"></textarea>
<div id = "result"></div>