added new method `batch` with tests
changed `batch` to return [] when count is invalid