It returns how many bricks are on top of the brick you called it on.
Also, I'm not sure, but I think even if something like an 8x16 plate is supporting bricks and is on the ground it is considered a baseplate. That might be only with the .isBaseplate() method, nit the built in variable.