That's a difficult challenge because some of the pegs are missing, but I would guess 24 pairs 😂.
I dealt with the socks problem for many years (and certainly any years involving children) by having them all the same colour, style and pattern so any two will match each other.
I make my own now, infinitely more comfortable than shop-bought.
RE: I Have Socks Problems