I did quite a lot of research into this sine we have infrequent but possible bear visits here. Alaska has done quite a lot of research into this and I'll distill it for you.
4 Strands of wire starting about a foot off the ground and putting the top strand around 40 inches. 1 Joule charger, it takes a heckuva lot more juice to deter a bear than a horse. Once a bear has been zapped they will pay very close attention to whether a fence is charged, they can detect electricity once they are aware of it and will avoid it.
We had a grizzly come by here a month ago, right along the fence protecting my orchard and bee yard. The bear got zapped, I think, a wire was broken, and she walked the entire perimeter before ambling off. The fence paid for itself that day. I spoke with the Fish and Game guy in charge of trapping bears here and he thanked my profusely for putting the fence up, if the bear had gotten into the bees they would have had to put her down since bees are considered livestock.
I use t-posts and the extended plastic insulators. I put the fence up in late August or when the first bear sighting is around here and take it down when the bears den up. I just leave the posts and insulators in place.
I hope this helps.
Lee