Change after_initialize to before_create

Because after_initialize is also run after a db fetch
Implement counting for multipart corpora