Refactored
Added count based pagination.

Must work on the start key and end key parameters.
count based pagination completed.

Removed the extraneous console logging.