Most Dexie methods are asynchronous, which (in Javascript) means they'll return Promises. You'll need to use a fulfillment handler or make it synchronous to access the actual number of elements.