You could use the count() function to see how many entries there are in the $_SESSION array. This is not good practice. You should instead set the id of the user (or something similar) to check wheter the session was initialised or not.
if( !isset($_SESSION['uid']) )
die( "Login required." );
(Assuming you want to check if someone is logged in)