So there's a few things I would recommend considering here. Sorry in advance, this is a long one:
1) Spell Slots. Bard is a full caster. Ranger is a half caster. For every odd numbered Ranger level you take, you effectively lose one on your total spellcaster level. So a Bard 9 / Ranger 3 is a 10th level caster (as is a Bard 8 / Ranger 4) while a Bard 10 / Ranger 2 is a 11th level caster. This is important in determining both the total number of spell slots you have, as well as the highest level spells you can cast, in turn determining how long you can go without a long rest and how much "burst" you can output. The reason I mention this all is that it's important to keep in mind as far as how far you want to go in Ranger. It also affects your multiclassing - Wizard and Sorcerer (and Cleric and Druid) are full casters whose total spellcaster level adds to Bard when determining the spell slots you have. Meanwhile Warlock is a unique spellcaster. Their spell slots are separate from other spellcasters, so while they're a full caster and they get 3rd level spells at 5 just like Wizard and the rest of them, a Bard 5 / Warlock 5 has 2 3rd level slots from Warlock and the 2 3rd level, 3 2nd level, and 4 1st level slots from a 5th level Bard. Conversely a Bard 5 / Wizard or Sorcerer 5 has the 2 5th level, 3 4th level, 3 3rd level, 3 2nd level, and 4 1st level slots of a 10th level caster.
https://bg3.wiki/wiki/Spells#Spell_slots2) Overlap. I agree entirely with smberg, Ranger / Bard has ranged single target damage covered in full, especially if you go College of Swords. You can pop a bunch of Ranged Slashing Flourishes to dish out a silly number of attacks per round. As an example, a 6th level Bard / 3rd level Ranger can use 2 slashing flourishes (for 4 attacks), a bonus action attack, and another slashing flourish off Horde Breaker, for 7 attacks in one round, without even using haste or burning any long rest resources. Assume 20ish average damage per attack and you're at 140 damage. Haste can get you another 3, apply vulnerability via Illithid Powers (assuming you're not on honor mode) and you can be dishing out 400+ damage before even hitting level 10, if you want. That's without even considering crits and with plenty of room to boost that figure higher. Eldritch Blast is great. Generally I think for the strongest builds out there it's a weaker Magic Missile and I personally mostly like it for the no save push effect, but the bigger issue is that it directly overlaps with something you can already do well - Very well in fact. It's generally better to invest in something which gives you the ability to use a resource you're not currently using effectively, rather than another option for the expenditure of a resource you're already using (an action for ranged damage, in this case).
3) Multiclass Spell Progression. High level spells are generally stronger than lower level spells (certainly not universally but it's nice to at least have the option), and getting for example 5 levels in Sorcerer and 5 levels of Bard means you know 3rd level spells of each, but no 4th level or higher spells in either class. And to get Counterspell via Sorcerer, you do indeed need a minimum of 5 levels. The only exception to this is Wizard, with Wizard you've got the ability to learn and cast spells of any slot you know, which means if you have Bard 4 / Wizard 1, you have Counterspell available. This unique mechanic is part of what makes Wizard such an attractive "splash" to me.
With that foundation in place, let's look at the level progression for Bard and Ranger and see what their power spikes are:
Bard
5 - Font of Inspiration changing Bardic Inspiration to a Short Rest recharge and Bardic Inspiration moving to a D8 is the biggest power spike Bard has, and it aligns with getting incredibly useful 3rd level spells including a very useful AOE damage / CC spell in Glyph of Warding as well as one of the best CC spells in the game in Hypnotic Pattern.
3 - 2nd level spells plus Expertise in 2 skills, a very powerful spike.
6 - Bards get their extra attack at 6 or magical secrets, making it very important.
10 - Improved Bardic Inspiration and 2 more Expertise
7, 9, 11 - Higher level spells always provide somewhat of a boost.
4, 8, 12 - Feats are good
In order of how impactful I think the levels are. All levels for Bard are good, but getting to 5 especially is absolutely crucial, and 6 as well if you are getting the extra attack from them.
Ranger
1 - Heavy Armor proficiency, 3 skill proficiencies or 2 and an extra boost like fire resist, Ranger is great for a 1 level splash.
2 - Spellcasting and a fighting style make a 2nd level very nice
3 - Subclass abilities, in many cases the most important ones for the class
5 - 2nd level spells and the extra attack feature and subclass features? Oh my!
11 - Extra attacks / better attacks, which are quite good and beyond the overlap obtained via the normal extra attack feature
4,8,12 - feats are good
the rest - kinda meh, not bad but not power spikes
So in my eyes Ranger is frontloaded, and the most important stuff for Bard if you're not going to 10 (which wouldn't align with MCing into 3 different classes) is getting to 6. In order to maximize your returns, I'd go Bard 6 / Ranger 3 at a minimum, which gives you 3 more levels to play with. Given that, Sorcerer 3 is an option, but it wouldn't get you counterspell which you listed as one of the specific targets. So I'd recommend:
Bard 8 / Ranger 3 / Wizard 1. Gives you extra attack and ranged flourish from Bard, Horde Breaker from Ranger, all the proficiencies you want, 2 feats, and 4th level spells with Bard, 5th level spells with Wizard, with a ton of your abilities recharging on short rest meaning you're effective all day long. The biggest downside is you're MAD as all getup. But you can have a Wis of 10 no problem, and you don't need Str for heavy armor in BG3. So if it were me I'd do Cha 16, Dex and Con 14, Int 12, Str and Wis 10. I'd also respec your 2nd Ranger level into Wiz now, go Bard until 6, pick up the other 2 ranger levels, then finish off with the last 2 bard levels as far as level order to get to your power spikes asap.
You can also go Sorcerer but if you want Counterspell *and* extra attacks *and* Sorcerer realistically Bard 6 / Ranger 5 / Sorc 1 would have to be the way to do it, which just gives you a lot less mileage all around.
A final note - with this build, especially if you go for feats like Actor or Sharpshooter, you're never going to have the best stats. But you can have spells that are utterly irresistible quite easily, by leveraging your silly number of attacks via slashing flourish to trigger a *bunch* of Arcane Acuity buffs from the helmet of the same name, turning 5 attacks or more in round 1 into +10 to your spell attack rolls and save DCs, at which point your stats hardly matter, the enemies are not making those saves (unless you're really targeting the wrong ability of theirs).