Marly has to get some cavities filled at the dentist. The dentist charges a fee of $35 plus $43 per cavity. If Marly ends up having a bill of $164 and c represents the number of cavities, which of the following equations could be used to find how many cavities Marly had filled?

A. 35 = 164 + 43c
B. 164 = 35 - 43c
C. 164 = 35c + 43
D. 35 + 43c = 164