Wikipedia: The Troubles
Between 1969 and 2001, 3,523 people were killed as a result of the Troubles.
Wikipedia: ETA
ETA has committed approximately 900 killings and dozens of kidnappings.
So we're at 4,500, including minor players in the Basque conflict.
If you round before adding, you have "nearly 4000 in Ireland and the UK" and "nearly 1000 in Spain". "It's the statue, man, The Statue."
There's also a definition issue... in that not all the deaths in N. Ireland were attributed to "terrorism."
Not that I'm saying the estimate is wrong. I think it's accurate, but it's also a very hard (and politically loaded) thing to measure.