why use `getCount()` instead of `hasData()`