When we've had ants, they've usually been the little ones that are attracted to sweet stuff. Not that I like them on the counters but if that's where I see them, I use liquid Terro II. They come in pre-measured little traps or a small bottle. I usually get the bottle and put a small puddle on a couple of small squares of foil and put them along the back of the counter or under the sink if they're under there. Sometimes you think there aren't too many ants but I've seen dozens of ants show up for the free meal and they eat and go away to die. So many show up it can be a little freaky. I think Terro has borax or something like that in it. At the back of the counter the dogs can't get to it.
This is what I use and you can get it at grocery stores, Walmart, Target, hardware stores, etc. TERRO® Liquid Ant Killer (our #1 best-selling ant poison)
While it has a little area you tear from the cardboard box to use as a bait station, aluminum foil or other random cardboard, like the outside of a cereal box, would work the same. The photo of the ants surrounding the bait- yep.