Check out [http://www.twilio.com/docs/quickstart/sms/tracking-conversat...]. It says that the session variable is stored as the context between two numbers. Is that a unique pair, or is it a direction pair?
In other words, is the $_SESSION between $_REQUEST['From']=='Zack' && $_REQUEST['To']=='HN' the same as the $_SESSION between $_REQUEST['From']=='HN && $_REQUEST['To']=='Zack?
If that's the case, then the example provided in your documentation is flawed, because you're saying:
A) <Sms><?php echo $name ?> has messaged <?php echo $_REQUEST['To']." ".$counter ?> times</Sms>
When you really mean
B) <Sms><?php echo $name ?> has messaged OR BEEN MESSAGED BY <?php echo $_REQUEST['To']." ".$counter ?> times</Sms>