do i still need to pay the costs of my spell if my spell is countered?
Yup. By the time someone has the chance to counter your spell, you've already paid the cost.