I'm no expert on this at all. But I suspect that the answer is like so much in English law, that magical word reasonable.
In other words is it reasonable for you to have barbed wire in that position. Is the fence high enough that no one going about their lawful business could possibly injure themselves on it. Is it obvious that the wire is there and not a concealed trap. I suspect it would be better if the wire was attached in a neat and secure manner so that it was clearly part of the fence (i'm thinking three stands like the top of fences around military barracks). Of course if the fence had planning permission, then that sort of authorises it too. I don't think that bared wire is illegal per se.
Yes a burglar could try and sue you for many different things, but I suspect that if you had acted reasonably, proportionally and in good faith their suit would fail.
However this is just a guess, just me trying to think sensibly. I don't really know!