They are all lawyers, or those schooled in the law.
A counselor is a "counsellor at law" or someone who dispenses "legal counsel", a lawyer. I don't know the origin of "counsellor at law" but I would think that it has something to do with what I just stated.
A "barrister" is a term used in the UK (correct me if I'm wrong, please!). If my memory serves me right one needed to be extremely knowledgeable in the law in order to approach a magistrate/judge, who sat behind a bar that separated his bench from the court participants (e.g., defendants, jurors, spectators, etc.) It is also where the term "pass the bar" came from, meaning the barrister/attorney/lawyer/counselor was deemed learned enough to engage with the magistrate/judge. Today it means a law student who has passed an examination which would qualify him/her to practice law.
An attorney is a lawyer.
I'm sure others will contribute their findings.
Just adding that I am not an educator.