To get Tables count in ax 2012 you can write below code .
treenode::findNode('\\Data Dictionary\\Tables').AOTchildNodeCount()
You can check this code in info message by job.
Technical Tutorials x++,tips on issues or troubleshooting On Ax ERP ,Microsoft Dynamics 365,Ax 2012,Microsoft , U.S.,Business Software solution.
treenode::findNode('\\Data Dictionary\\Tables').AOTchildNodeCount()