#Python 2 - 390#
Python 2 - 390
Takes a string with newlines from stdin. It's a pretty simple method golfed a fair bit, but I'm sure not as much as it could be considering how long it is.
s=raw_input().split('\n');L=len def R(x,y): b=p,q=x,y;u=v=f=0 while b!=(p,q)or not f: p+=u;q+=v;f=u+v;c=s[q][p] if'+'==c:u,v=[(i,j)for i,j in{(-1,0),(1,0),(0,-1),(0,1)}-{(-u,-v)}if 0<=q+j<L(s)and 0<=p+i<L(s[q+j])and s[q+j][p+i]in['-+','|+'][j]][0];s[q]=s[q][:p]+' '+s[q][p+1:] if c+s[q+v][p+u]in'-|-':p+=u;q+=v print L([R(x,y)for y in range(L(s))for x in range(L(s[y]))if'+'==s[y][x]])