filename has the value fred.c, then ${#filename} would have the value 6.
The other operator (${#array[... can be used in a variety of ways. A good example would be to give a default value to a variable normally... can be used in a variety of ways. A good example would be to give a default value to a variable normally... k.
If we used #*/ instead of ##*/, the expression would have the incorrect value dave/pete/fred/bob, beca