count_extensions: 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/count_extensions - from package: sloccount

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

On Debian possible default full paths are:

/usr/bin/count_extensions - from package: sloccount

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