HDFS-6763, the quota on the standby namenode is not being updated until it transitions to active. This causes the jmx and the web ui files and dir count to be uninitialized or unupdated. In some cases it shows a negative number.
It is because the legacy way of getting the inode count, which existed since before the creation of inode table. It relies on the root inode's quota being properly updated. We can make it simply return the size of the inode table.