The proper way to iterate over files in a directory in Bash is using "for loop" and glob as following:
for f in *.jpg; do
echo "- Processing file: $f"
done
But how can I retrieve the total count of the files and the current index of the loop interaction? I need the total count, not the cumulative count to show the progress.