Added lua function for getting the current number of merits.