Counting commas might work as a quick hack if you're fortunate enough to never have any commas or newlines within double-quotes in a column, but in general that is a broken solution.
You should...