b/w record album chart numbers

I have a question regarding how the “B” side of 45 singles were listed in the Billboard charts. For example, in 1959, the “A” side of the single “Donna” hit #2 on the Billboard charts, while the “B” side, “La Bamba”, made it to #22. How did Billboard know why people were buying the “Donna”/“La Bamba” single? I mean, how did they know more people were buying the single for “Donna” rather than “La Bamba”? How did they accurately chart the sales? In another respect, some bands had their “A” side single reach #1 and the “B” side hit #70 (for example). How did Billboard know people were buying the single for the “A” side and not the “B” side?

radio play

Oh, I guess that would explain it. Not sure why I didn’t think of that. Thanks for the response. Follow up question: Wouldn’t it take a long time to gather information from every radio station in the country and compile a list to determine which songs were played the most? Especially since they come out with new charts every week. Perhaps with computers, that task is not too difficult anymore, but I imagine it would have been back in the 1950s.