The best champs globally to counter Heimerdinger include Varus, Kalista, and Samira. These are all great at countering Heimerdinger with decent win rates over 57%. Even if these Heimerdinger counter picks are not chosen in the same position as you, it's not smart to take him into any of these matchups. They will often crush Heimerdinger.
Conversely, if the opposing team brings either Ziggs or Udyr, you should seriously think about choosing him, as he easily destroys these selections with win rates over 55% against both ofthem.