The protocol is just a number:
$ grep icmp /etc/protocols
icmp 1 ICMP # internet control message protocol
ipv6-icmp 58 IPv6-ICMP # ICMP for IPv6
These numbers share the same "namespace": Internet Procol, some protocols are common, eg: UDP (17), TCP (6), SCTP (132), but others are not, especially when differences between IPv4 and IPv6 matter. That's the case for ICMP: two different protocols.
On a normal environment setup there will never be an IPv6 packet with ICMP (value 1) in its upper layer protocol header. Likewise on IPv4 there should never be an IPv4 packet of type ICMPv6 (aka ipv6-icmp) (value 58). Perhaps some environments using NAT64 could imperfectly leak such packets (ICMP over IPv6 or ICMPv6 over IPv4).
At the same time ip6tables deals only with IPv6: it won't filter at all packets of type IPv4, the same way iptables deals only with IPv4 and won't filters packets of type IPv6.
So the correct way to filter (or here count) both is to have one IPv4 rule and one IPv6 rule each with its correct upper layer protocol.
sudo iptables -A INPUT -p icmp -j ACCEPT
sudo ip6tables -A INPUT -p ipv6-icmp -j ACCEPT