This article moved to https://articles.msdevbuild.com/2011/01/how-to-get-number-of-records-in-table.html.