How to create device variant with different pin count in Eagle?
In Eagle you can define a part with multiple package variants, so long as they have the same schematic symbol(s).

In your case you actually are looking two different part numbers with a common datasheet, the first being the AP2210K and the second the AP2210N.

These two parts have different schematic functionality which means proper way of making such a part is in fact to make two separate parts, one for the AP2210K, and the other for the AP2210N.