or you can try this.
sp_msforeachtable @command1 = 'print ''?''' ,
@command2 = 'select count (*) from ?'
sp_msforeachtable will perform up to three commands on each table in the database. When running, it replaces the ? with the name of the table.