(1) Determine the amount of statues

05AB1E, 15 bytes


Try it online!


„-|              # push string literal "-|"
   v        }    # iterate over this string
    €Åγ          #   run-length encode each line of the input / transposed input
                 #   this pushes the chunk elements and the chunk lengths
       ˜         #   flatten the list
        y¢       #   count the chunks of the current character
          Iø     #   push the transposed input to the stack for the second iteration
             Š   # triple-swap: move the transposed input to bottom
              +  # sum both counts

Ruby, 93 86 61 58 bytes

Saved seven bytes, thanks to Razetime!
Saved three bytes, thanks to ovs!


Try it online!

Takes input as a matrix of characters.

Retina 0.8.2, 37 bytes


Try it online! Uses ¦ instead of |. Explanation:


Count runs of -s, or...


... any ¦s which do not have a ¦ directly underneath them on the next line. This uses a .NET balancing group to ensure that the two ¦s are vertically aligned.