"There are thirty eight carrots in that bag."
Translation:Tá ocht gcairéad is tríocha sa mhála sin.
tríocha a hocht is a "disjunctive number" or maoluimhir that occurs between tríocha a seacht and tríocha a naoi. "disjunctive numbers" don't have a noun after them.
"thirty eight carrots" does have a noun after it, so you use the "conjunctive number" (bunuimhir) form - ocht cairéad is tríocha.
Most schools teach 38=tríocha a hocht.
But, unlike English, Irish differentiates between "disjunctive numbers" or maoluimhreacha, when you are just counting numbers, and "conjunctive numbers" or bunuimhreacha when you are specifying a number or amount of something. Unfortunately, not everyone learns that in school, and nowadays many people use the maoluimhreacha forms when they are specifying a number or amount of something.