And what is counter to firearms?
Fast melee cavalry (slow rate of fire for handguns and bad aim, a bullet might not kill a medium sized horse anyways)
Horse Archers (faster rate of fire than handguns, out ranges, too fast to target)
Light infantry good at dodging and ninjas
Ranged infantry that has a faster rate of fire, better accuracy, and longer range than the firearm wielder (any mid-tier bow or xbow)
Fire arms would be effective against close-by, slow-moving targets. Their "balance-niche" would be a slow reloading, more powerful, and less accurate crossbow. Good for tight entry points like bridges, causeways, tunnels, corners, etc.