I don't think there's a way to get the licence number over REST, but as it rarely changes and has to be changed by admins, that's quite a minor thing.
For current users, try a "get" on /rest/api/2/user/permission/search using the permission "USE". Every account that has "use" counts towards your licence usage.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events