Count links in all of my web pages

Counts the number of hyperlinks in all web pages in the current directory and all of its sub-directories. Count in all files of type "*htm" and "*html" .
i want the output to look something like this:
Total number of web pages: (number)
Total number of links: (number)
Average number of links per page: (number, to the nearest integer)

thanx

This sounds like a homework problem, we will not do your homework for you on this board. A hint: this task can be completed with perl or a combination of grep, sed and find.