If you only want user tables, and if you don't mind information schema view (they're system table independent), then the following will work:
TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME <> 'dtproperties'
Note that you have to manually exclude "dtproperties", which is true of the other scripts in this thread as well. For some reason, that is considered a user table even though it's for storing database diagrams. Remove the "Count()" if you want the names themselves. If you want to count system tables as well, then don't use the information schema view method, as those aren't included.