I doubt its either 301 or 302. Most forums use javascript/meta refresh to redirect. And that's not good for SEO...Yes, it all depends on whether there is a 301 redirect in effect.
If it's 301, the link will be counted.
If it's 302, the link will not be counted.