Some ships captains have four bars.
Don't they all?
No they don't. A person with the rank of Captain in the Navy will have 4 bars, but a ships's captain can hold a lower rank, perhaps even down to a lowly Sub-Lieutenant. I would hazard a guess that all persons in command of a civil vessel would wear 4 bars though.