<?php

function fn_hmedian_t($aql)
{
	$list = $aql->Consume(1);
	
	LiveValuesForPoints($list[0]->value);
	
	$count = 0;
	foreach($list[0]->value as $p)
	{
		if (is_array($p->history))
			$count += count($p->history);
	}
	
	$a = new AQLStackElement();
	$a->typename = "const";
	$a->islist = false;
	$a->value = $count;
	array_push($aql->stack,$a);
}

?>