diff --git a/check_packages2install-pkgmanager/yum.sh b/check_packages2install-pkgmanager/yum.sh
index c875ff7dbdc381aa6175cf0c9ab1077f42608635..aaad7caa9ebacf746e4cf4daa591d94d20a54e53 100644
--- a/check_packages2install-pkgmanager/yum.sh
+++ b/check_packages2install-pkgmanager/yum.sh
@@ -17,6 +17,7 @@
 # 2023-08-25  v1.5  ah  centos9: fix package lists
 # 2023-09-12  v1.6  ah  almalinux9: fix package lists
 # 2023-10-20  v1.7  ah  harden sudo command execution
+# 2023-12-13  v1.8  ah  fix total count of packages to install
 # ===============================================================
 
 
@@ -61,7 +62,7 @@ function yum.getStatusLine(){
       fi
       ;;
     9)
-      local _total; _total=$( echo -n "${packages2install}" | wc -l )
+      local _total; _total=$( grep -c . <<< "${packages2install}" )
       local _sec;     _sec=$( sudo /usr/bin/yum -y --security check-update \
           | grep -v "^Last" \
           | grep -v "^No security updates needed" \