Write down a script which utilizes a dynamic SQL in order to return a single column which represents the number of rows within a particular table in current database. The script must automatically select the user base table which appears first. Exclude the tables “dtproperties” and “sysdiagrams”. List the column CountOfTable, in which the Table is the chosen table name.