We normally count them, when they are living, 一匹{いっぴき}. When they are fished and have become products, they are called 一杯{いっぱい}. Next article explains:
According to ジャパン・ナリッジ: なぜイカやカニは「1杯(ぱい)」と数える?http://japanknowledge.com/articles/kze/column_kaz_01.html
One theory explains octopuses and squids classified as shellfish of Mollusca, so they are counted as 一貝{いっぱい}. But they also say another theory is more prominent. That is the body of squids and octopuses looks like an urn, pot or pint glass. That's why we count non-living selling squids for 一杯{いっぱい}. The shell of Abalones and Crabs look like the round shape of the container such as urn, pot, too. For me, calling beer pint glass 一杯{いっぱい}, 二杯{にはい} for drinking, it's imaginable to count octopuses, squids, the shellfishes as 杯{はい}since they look like the shape of beer pint glass.
This article https://macaro-ni.jp/34892 also explains:
We count, when squids become するめ 一枚{いちまい}or sashimi on the plate 一盛{ひともり} or sushi 一貫{いっかん} or fishing two squids 一荷{いっか}at same time or, bundle up 10 quids 一連{いちれん}. For me, these counting is more familiar to me. Probably I don't see the following things so often:

