I'm not sure I fully understand your problem but if you're asking how you can set more than one variable in a single command, use
read.
Code:
grep -c "$string" * | while IFS=: read fileName count
do
echo "File $fileName has $count lines containing $string"
done
As for your second question, can you elaborate a little because I really can't grasp what you might be asking.
Damian