I'm replacing some old tile on a bathroom countertop with granite tile. When I removed the old tile, I found blue foam underneath. Should I remove this and place a backerboard in its place or could the new tile be placed over the foam with thin-set mortar?
Not sure what you are referring to when you say 'blue foam'? No product I can think of would be described as blue foam when removed.
That said, the better option is always to remove all signs of an old installation and rebuild from the bottom up. I would not install anything over a substrate that is unidentified. Especially not granite.
Ideally you want two 3/4" plywood layers with your substrate on top of those. This minimizes flex and solidifies your installation. Depending on the size of your countertop you can probably get away with a bit less than that.
You can use backerboard for your substrate and it will work just fine. I prefer using Schluter Ditra membrane in place of backerboard. It has better uncoupling properties and all kinds of other technical mumbo jumbo you don't care about. Let's just say it's a better option but backerboard will work fine.