lex_count: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/lex_count - from package: sloccount

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/lex_count - from package: sloccount

You may install the required package with command apt-get install {package}
Error in other languages:
lex_count: bevel nie gevind nie
lex_count: comandă negăsită
lex_count: comando não encontrado
lex_count: commande introuvable
lex_count: command not found
lex_count: käsku ei ole
lex_count: không tìm thấy lệnh
lex_count: komanda nerasta
lex_count: Kommando nicht gefunden.
lex_count: kommandot finns inte
lex_count: komut yok
lex_count: nie znaleziono polecenia
lex_count: níor aimsíodh an t-ordú
lex_count: no se encontró la orden
lex_count: no s'ha trobat l'ordre
lex_count: opdracht niet gevonden
lex_count: parancs nem található
lex_count: perintah tidak ditemukan
lex_count: príkaz nenájdený
lex_count: příkaz nenalezen
lex_count: команда не найдена
lex_count: командата не е открита
lex_count: 命令找不到
lex_count: コマンドが見つかりません