Well, you nailed it.
A couple of billion things are missing in pfSEnse - this one of them !
So, the "function" or "Environmental variable" that's initialized with the current online users doesn't exist.
You have to make it yourself ;)
So, go grab a kid from the street and ask him to write a couple of PHP lines.
Note that he isn't gona think a lot. He will 'borrow' some code from the gadget named "Captive Portal Status" and count the number of lines that that gadget will show.
He will insert (include) the code in the portal page script.
Done ;D
You didn't say anything about the version of pfSEnse you use, so I presume 2.0.3.