If it took you 30 hours to get your IR(R) (!) then it would all count.
Not necessarily:
(i) When the applicant has:
(A) completed instrument flight instruction provided by an IRI(A) or an FI(A)
holding the privilege to provide training for the IR; or
(B) prior flight time under IFR as PIC on aeroplanes, under a rating providing
the privileges to fly under IFR and in IMC these hours may be credited towards the 40 hours above up to maximum of 30 hours,
Many FIs teaching the IR(R) are not so qualified!