More specifically, if we want to understand the different chains within a protein, is it enough to look at the fourth column of all the lines that start with "ATOM" in a pdb file, and see how many different chain identifiers exist there?
In the PDB format the lines with atoms can start either with
Chain ID is in column 22, i.e. it is 22nd character of a line that starts with
HETATM. (Programs that support 2-character chain IDs use columns 21-22 − it's a popular extension of the PDB format).
Yes, the number of different chain IDs is the same as the number of "chains" in the PDB file. But note that the "chain" from the PDB format is not necessarily a real chain (polymer). It may be a bunch of water molecules or something else.