for word in ${myarr[*]}; do echo $word done | grep -c "hello"
let count=0 for x in ${my_array[*]}; do if [ $x == 'abc' ] then count=$((count+1)) fi done