The countMe line can't have two equal signs, otherwise you're essentially asking Excel if the formula in B1 is equal to "=LEN(SUBSTITUTE(B1,""|"",""""))", which it is not, so it's returnig zero. You can see this by changing the data type of countMe to Variant, and it will default to Boolean and you will get a FALSE instead of a zero.
That's like saying:
countMe = 1 = 0
Which will always result in 0, because 1 <> 0.
You're trying to use application formulas as VBA functions. The proper usage of LEN() would be:
countMe = LEN(Range("B1"))
But for your problem of counting the # of pipes in B1, use the code from this other post:
How to find Number of Occurences of Slash from a strings