I don't see any reason why you can't spread your mastic onto a painted wall and have the tiles stick equally well to it if that paint is holding well.
In my view, what's more important in terms of how long the tiling lasts is that after grouting you wait two weeks for the grout to dry completely and then seal that grout with a good quality ACRYLIC sealer. That's because in most cases, tiling doesn't "wear out" it "uglys out" as a result of mildew growth on the grout. Coating that grout with a sealer that prevents both the grout from absorbing any water and the mildew from growing on the porous surface of the grout will prevent it from "uglying out" for a long, long time.
It's also important to recognize that in a kitchen, the counter top is fastened to your kitchen cabinetry that is fastened to the floor, whereas the backsplash above the counter top is fastened to the wall. As a result, there's always going to be a tiny bit of movement between the two, and any grout you put in that joint is going to crack.
What you should do is phone around to the places listed under "Tile, Ceramic" in your telephone yellow pages and ask those places if you can flip through their "Schluter" catalogue. Schluter is a company that makes all kinds of tiling accessories, including all kinds of moldings designed to solve problems exactly like the one described above, which is to provide a waterproof flexible joint. Only Schluter will have designed a molding to fit between a tiled counter top and a tiled backsplash. Still, by seeing what products are available from Schluter, you can see what problems have already been solved by Schluter for you.
All I'm saying is that by paying a bit more for a molding or accessory from Schluter that has beed designed to solve a problem that you're facing (or wasn't even aware may be a problem), you can get a much better tiling job for only a few dollars more and don't have to rely on years of tiling experience you don't got.
And, any place that has a Schluter catalogue will order the stuff for you or will tell you which of the retailers they sell to you can order it from.