As @el_samou_samou explained, the number of elements stays the same, while the size may differ.
Here is a small example:
x = torch.randn(2, 2, 2, 2)
print(x.size())
x = x.view(-1, 2, 1)
print(x.size())
x = x.view(-1)
print(x.size())

While the underlying data of x stays the same, its size changes after each view call.
Nonetheless the number of elements is the same.
A call like x.view(2) won’t work, as we have 16 elements.