The issue has been fixed in VMware Cloud Foundation 5.1.1 release.
Workaround:
The users can simply choose to ignore the incorrect license count in the 'Available quantity' field when assigning the license.
Also, the error alert should be ignored as it does not prohibit the user from moving forward. Users can proceed with the addition of license even with the error alert. If there are sufficient licenses available, the operation would succeed.