#JavaScript (ES6), 71
Beating @ETHProductions while he does not see my hintBeating @ETHProductions while he does not see my hint. He saw it.
x=>x<1e3?x:x<1e4?(x+='')[0]+','+x.slice(1):(x/1e3).toFixed(x<99950)+'k'
Test
f=x=>x<1e3?x:x<1e4?(x+='')[0]+','+x.slice(1):(x/1e3).toFixed(x<99950)+'k'
function test() { n=+I.value, O.textContent = n + ' -> ' + f(n) }
test()
<input id=I type=number value=19557 oninput=test()>
<pre id=O></pre>
Test