Can Automator distribute a large number of files into counted subfolders?
This should do what you've asked for. As coded, the only thing you may need to change in the bash script is filesPerSubDir="128" if you want a different file count per subdirectory within the parent directory that's passed to the Run Shell Script action.  

Add a Run Shell Script action to your Automator application/service/workflow and set Shell: /bin/bash and Pass input: as arguments. Remove the default code and then copy and paste the code below into the Automator Run Shell Script action.



#!/bin/bash

filesPerSubDir="128"

for argument in "$@"; do
    if [[ -d $argument ]]; then
        cd "$argument" || exit 1
        dirName="$(basename "$argument")"
        fileCount="$(find . -maxdepth 1 -flags nohidden -type f ! -iname ".*" | awk 'END{print NR}')"
        subDirCount="$(( fileCount / filesPerSubDir + 1 ))"
        for (( i = 1; i &lt; subDirCount+1; i++ )); do
            find . -maxdepth 1 -flags nohidden -type f ! -iname ".*" | head -$filesPerSubDir &gt; .moveList
            if [[ -s  .moveList ]]; then
                mkdir "$dirName $i"
                while IFS= read -r file; do
                    mv "$file" "$dirName $i"
                done &lt; .moveList
            fi
        done
        rm .moveList
    fi
done




The image below shows a testing of the code and the workflow completed successfully as noted by the green circles with the check mark. This is just and example of how to implement the Run Shell Script action, it can be done numerous ways however you just have to pick what method you want to pass the Folders in Finder to it, the rest is done by the script.





The image below shows the code with syntactical highlighting and is included as it helps in reading the code (especially when the code isn't commented, sorry don't have time at the moment).





Note: The bash script is not coded to handle an embedded newline in the name of a filesystem object, which IMO doesn't belong there in the first place! Feel free to modify as needed/wanted to suite your needs, adding/modifying code and or additional error checking if/when wanted/needed. Additionally, this is by no means the only way to code  the script to handle what you want automated but it's what I threw together to get something posted for you. If you have any questions, just ask.