countMulSig tx out i (pub:pubs) sigs@(TxSignature sig sh:rest)
    | verifySig (txSigHash tx out i sh) sig pub =
         1 + countMulSig tx out i pubs rest
    | otherwise = countMulSig tx out i pubs sigs
countMulSig tx out i (pub:pubs) sigs@(TxSignature sig sh:rest)
    | verifySig (txSigHash tx out i sh) sig pub =
         1 + countMulSig tx out i pubs rest
    | otherwise = countMulSig tx out i pubs sigs
countMulSig tx out i (pub:pubs) sigs@(TxSignature sig sh:rest)
    | verifySig (txSigHash tx out i sh) sig pub =
         1 + countMulSig tx out i pubs rest
    | otherwise = countMulSig tx out i pubs sigs