MAINT: Faster preallocation and count with integer-type