i used the following command index=ABC | stats values(L) AS USER
i need the output like below user usercount Ramesh 54 Somesh 12 Kamlesh 27
Try this!
index=ABC | stats count AS usercount by L | rename L as user