You can use awk
like this:
awk -F, '{print "I have", $1, "and the count is", $2}' file
I have apple and the count is 2
I have mango and the count is 5
I have coconut and the count is 10
Though awk
is recommended but if you are looking for a bash loop then use:
while IFS=, read -r f c; do
echo "I have $f and the count is $c"
done < file