The attached script would give you the table row count from all databases on the server using sp_msforeachdb and sp_msforeachtable. 

sp_msforeachdb and sp_msforeachtable are undocumented procedures.

These undocumented Stored Procedures can be used if we want to do the same operation on each table of any database. Please note that Microsoft may change the functionality and definition of this Stored Procedure at any time. 

More Details: