The length property is used to get the number of URLs in the history list.
<html>
<head>
<title> Using the length property of the History object</title>
</head>
<body>
<script language="JavaScript">
<!--
var numOfURL = window.history.length;
document.write("The number of URL's in the history list is: " + numOfURL);