Is it possible to count the files of a directory by their permission? I have tried the following but 1)it does not have a counter 2)it doesnt find the files
echo "The number of the files of the owner"
find . -user $(whoami) -perm -006
echo "only for a group"
find . -user $(whoami) -perm -005
echo "noones permission"
ls -a | grep "^\."`