You've got the right idea, just a different shell, so a differnet syntax:
var1=$(ls abc* | grep abc | wc -l)
Now, before you go any further: there's extra logic in that above statement; as in, the grep is pointless. Also, this will list directories containing "abc" as well.
I would rather do this:
var=$(find . -type f -maxdepth 1 -iname "abc*" | wc -l)
That will identify all FILES in the working directory, which begin with abc. Read the man page for the `find` command to understand how it works.
Any questions, feel free to ask