Also note that the "free count" that the API returns fails to take into account DHCP reservations. So it is very possible to have a "freeCount" and to have no DHCP addresses available.
You can test this easily by creating a DHCP scope, and then reserving the whole thing.