getKeyCount function for nonleafnode