g | x | w | all
Bytes Lang Time Link
014Uiua241008T033058Znoodle p
020Ruby rcsv241003T185817ZJordan
019POSIX shell ShellShoccarjpn/Parsrs + uspengineerscommunity/Openusptukubai221126T093901Z鳴神裁四点一号
101Java 10180611T071315ZKevin Cr
012Jelly180610T162851ZJonathan
012Stax180610T011501Zrecursiv
040R180610T133424ZGiuseppe
059JavaScript ES2018180610T014018ZRick Hit
053Perl 5.10.0180609T221730Zwastl
030Wolfram Language Mathematica180610T102638Zalephalp
017Jelly180609T221242ZErik the
063Python180609T223049ZSlayerGa

Uiua, 14 bytes

≡/+¬∵≍□W⬚W°csv

Try it: Uiua pad

Ruby -rcsv, 20 bytes

Reads from STDIN.

p CSV($<).map &:size

Attempt This Online!

POSIX shell (ShellShoccar-jpn/Parsrs + usp-engineers-community/Open-usp-tukubai), 19 bytes

Dependencies are

parsrc.sh|count 1 1

Output format

For each line, the following line is output:

<row number> <number of columns>

How it works

parsrc.sh is a parser for CSV who converts such text into list of cells and their value. Open-usp-tukubai's count takes a range of field number from parameters and space-separated values to count in such range to summarize. Here are some comments:

# raw CSV
parsrc.sh |
# 1: row number 2: column number 3: value where LFs are represented as "\n" while real backslashes as "\\"
count 1 1
# 1: row number 2: number of columns in the row

Example run on Termux

Because Termux is not a completely POSIX-compatible so command -p getconf PATH fails, I am dropping the boilerplate to set PATH environment variable so the shell calls completely POSIX-compatible utilities first. Also because I am lazy to prepare Python 2, I am doing with COMMANDS.SH/count.

Example run on Termux but had some modification

Java 10, 101 bytes

s->{for(var p:s.replaceAll("\"[^\"]*\"","x").split("\n"))System.out.println(p.split(",",-1).length);}

Try it online.

Explanation:

s->{                                    // Method with String parameter and no return-type
  for(var p:s.replaceAll("\"[^\"]*\"","x") 
                                        //  Replace all words within quotes with an "x"
             .split("\n"))              //  Then split by new-line and loop over them:
    System.out.println(p.split(",",-1)  //   Split the item by comma's
                        .length);}      //   And print the length of this array

Jelly, 12 bytes

ṣ”"m2FỴ=”,§‘

A port of recursive's Stax answer - go give credit!

Try it online!

How?

ṣ”"m2FỴ=”,§‘ - Link: list of characters, V
 ”"          - a double quote character = '"'
ṣ            - split (V) at ('"')
   m2        - modulo slice with two (1st, 3rd, 5th, ... elements of that)
     F       - flatten list of lists to a list
      Ỵ      - split at newlines
        ”,   - comma character = ','
       =     - equal? (vectorises)
          §  - sum each
           ‘ - increment (vectorises)
             - (as a full program implicit print)

Maybe you prefer ṣ”"m2ẎỴċ€”,‘ - is tighten and ċ€ counts the commas in each.

Stax, 19 12 bytes

èJ§3‼}vAà○L>

Run and debug it

Unpacked, ungolfed, and commented, it looks like this.

_'"/    split *all* of standard input by double quote characters
2::     keep only the even numbered elements
|j      split on newlines (implicitly concatenates array of "strings")
m       for each line, execute the rest of the program and output
  ',#^  count the number of commas occurring as substrings, and increment

Run this one

R, 40 bytes

(x=count.fields(stdin(),","))[!is.na(x)]

Try it online!

Per the documentation of count.fields, fields with line breaks get a field count of NA for the initial line, so we filter them out.

JavaScript (ES2018), 42 59 bytes

s=>s.replace(/".+?"/sg).split`\n`.map(c=>c.split`,`.length)

f=
s=>s.replace(/".+?"/sg).split`\n`.map(c=>c.split`,`.length)

console.log(f(
`,"Hello, World!"
"aaa","b""bb","ccc"
zzz,yyy,
"aaa","b 
bb","ccc","fish",""`))

Perl 5.10.0, 55 53 bytes

$_=shift;s/"(""|[^"])*"//g;s/^.*$/1+$&=~y:,::/gem;say

Try it online!

Explanation:

$_=shift;          # first command-line arg
s/"(""|[^"])*"//g; # remove quoted fields
s/^.*$/            # replace each line       
  1+$&=~y:,::      # by the number of commas plus 1
/gem;
say                # print

Wolfram Language (Mathematica), 30 bytes

Length/@ImportString[#,"CSV"]&

Try it online!

Jelly, 17 bytes

=”"ÄḂżṣ⁷ݤṣ€0,”,Ẉ

Try it online!

-1 thanks to Jonathan Allan. duh duh duh...

Python, 63 bytes

import csv
def f(s):return map(len,csv.reader(s.split("\n"))

Returns the output in an iterable map object.