Add sessions number culculating and handling this in template.