I looked at some manufacturer's documentation. Short answer: the stated size is the total length of the pipe nipple including the threaded sections.
This does appear to be consistent among manufacturers (at least in the US / North American market).
Also an important detail is that the length of the threaded sections is standard for each pipe diameter. So with a little information you can figure out what length the unthreaded middle portion of the pipe nipple has.
Length diagram from Anvil Intl.:
And their accompanying diagram of the available standard nipple lengths. What's important about this is the "close" lengths - these are nipples that are fully threaded, and so its the shortest total length they could be at that diameter. If you subtract this from any of the others you get the unthreaded length.
Example: a 1" size pipe 6" long. The close length is 1 1/2", so the remaining unthreaded portion must be 3 1/2". (Plus or minus 1/8" as noted on the first diagram).
These documents state "APPLICABLE SPECIFICATION: ASTM A733" which means, I think, that these measurements should be consistent among manufacturers.