"Data obtained under Freedom of Information Act shows 12 of 19 in custody identified as the opposite sex ‘after their date of admission’"
The Scottish Prison Service did its best to obscure the answer. Seven of the 19 are held in the female estate, and the SPS response said: “of those seven, less than five individuals in our care were recorded as beginning their transition after their date of conviction”.
So that's 4 then, 4 out of 7.
https://www.telegraph.co.uk/news/2023/03/27/60pc-scotlands-trans-prisoners-began-transitioning-convicted/
[Headline says 'after being convicted', but the numbers seem to include those on remand]
Also worth noting that of the 7, 4 are convicted and 3 are on remand. All 4 of those actually convicted are there for a violent crime. But a non-sexual violent crime (at least on this occassion) so that's all absolutely fine. (/s)