You see this because len() and __ len __() are not the same things, as explained here:
https://kushaldas.in/posts/len-function-in-python.html 1
If you do:
print(dataset.__len__())

you will get 500 as you expect.