Hi Kirill!
Thank you!
Inspired by the number-of-parameters part of your answer I figured, I could actually get it in a slightly simpler way:

model.num_parameters()

which returns the same number as your solution.
Thanks for help!