I'm having a similar problem. I'm trying to assign the results of a line count to a variable so it can be used in an arithmetic expression which in turn will split a document in half (on the basis of the a halved line count). No such luck. Any hints?
The output from "wc" usually has some embedded whitespace, which can prevent the shell from treating it like a number:
Of course, there are other ways to get the number: