$ dpkg -S /bin/ping
iputils-ping: /bin/ping
$ grep 'downloaded from' /usr/share/doc/iputils-ping/copyright
It was downloaded from https://github.com/iputils/iputils
$ git clone https://github.com/iputils/iputils
...
$ cd iputils/ping
Then a bit of looking around shows that in acknowledge() (an inline helper defined in ping.h), pipesize records the largest difference between the sequence number of the (last) outbound probe and than the sequence number of the inbound probe we're receiving. That function is called from gather_statistics() (for the happy path) and in a couple of other locations when receiving an ICMP error.
https://github.com/apple-oss-distributions/network_cmds/blob...
And if you keep looking, Apple's version of ping keeps track of the number of sent and received probes, but does not keep track of the largest difference between the sequence nubmer of sent and received probes, so it will not print the same "pipe" value as the iputils version of ping (ie. the version you typically get in Linux).